G.ParticleEffectAttach

From GMod Wiki

Revision as of 10:34, 7 September 2011 by ClavusElite (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax ParticleEffectAttach( String name, Enum attachType, Entity entity, Integer attachmentID )
Where is this used?
Description:
Creates a particle effect using the Orange Box particle system and attaches it to an entity at the specified attachment.
Returns: nil
Part of Library: Global Functions
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.ParticleEffectAttach]G.ParticleEffectAttach [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates a blue barrel at the world origin and attaches the TF2 flamethrower effect to it.
Used onNewerServer.png
Code
local prop = ents.Create("prop_physics")
prop:SetModel("models/props_borealis/bluebarrel001.mdl")
prop:SetPos(Vector(0,0,0))
prop:Spawn()
ParticleEffectAttach("flamethrower",PATTACH_ABSORIGIN_FOLLOW,prop,0)
OutputN/A


Additional Notes

SHARED | 0000000000000000 | 00000000000000000 | PATTACH_ABSORIGIN -- The particle system will be placed at the position of the entity.
SHARED | 0000000000000001 | 00000000000000001 | PATTACH_ABSORIGIN_FOLLOW -- The particle system will also follow the entity.
SHARED | 0000000000000002 | 00000000000000010 | PATTACH_CUSTOMORIGIN
SHARED | 0000000000000003 | 00000000000000011 | PATTACH_POINT -- The particle system will be put at the position of the attachment specified.
SHARED | 0000000000000004 | 00000000000000100 | PATTACH_POINT_FOLLOW -- The particle system will also follow the entity.
SHARED | 0000000000000005 | 00000000000000101 | PATTACH_WORLDORIGIN

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox