Entity.CreateParticleEffect

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:CreateParticleEffect( String Name, [ Table Control Points ] )
Description:
Creates a particle effect on the entity.
Returns: nil
In Object: Entity
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.CreateParticleEffect]Entity.CreateParticleEffect [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates a blue TF2 medigun beam between the local player's feet and what they're looking at.
Used onNewerClient.png
Code
local pl = LocalPlayer()
local tr = pl:GetEyeTraceNoCursor()
 
--Control Points
local CPoint0 = {
	["entity"] = pl,
	["attachtype"] = PATTACH_ABSORIGIN_FOLLOW,
	}
local CPoint1 = {
	["entity"] = tr.Entity,
	["attachtype"] = PATTACH_ABSORIGIN_FOLLOW,
	}
 
--Create the particle effect!
pl:CreateParticleEffect("medicgun_beam_blue",{CPoint0,CPoint1})
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox