|
Returns
|
ClientParticleSystem
|
|
Prototype
|
ClientParticleSystem.Create(table arguments)
|
|
Description
|
No description
|
Argument table
Required values
Examples
Create an explosion where you click
particleSystems = {}
Events:Subscribe("MouseDown", function(args)
if args.button ~= 1 then
return
end
local result = Physics:Raycast(
Camera:GetPosition(),
Camera:GetAngle() * Vector3.Forward,
0,
100
)
local spawnArgs = {
position = result.position + result.normal * 0.25,
angle = Angle(),
path = "fx_exp_grenade_01.psm",
}
local particleSystem = ClientParticleSystem.Create(AssetLocation.Game, spawnArgs)
table.insert(particleSystems, particleSystem)
end)
Events:Subscribe("ModuleUnload", function()
for index, particleSystem in ipairs(particleSystems) do
particleSystem:Remove()
end
end)