• Effect attaching itself to a null entity, making it spawn at (0,0,0) on the map.
    1 replies, posted
So I made a quick flechette gun for a bit of a test to myself and attached an effect called aurora_02b to it: [lua] timer.Simple(0.3,function() ParticleEffectAttach("aurora_02b",PATTACH_ABSORIGIN_FOLLOW,ent,0) end)[/lua] Problem is, when I shoot and hit an NPC with the flechette, the effects don't spawn. This is okay for me. The problem is that the effects spawn at the coordinates of (0,0,0) on the map, and do not disappear whatever I do. How do I detect whether the effect is attached to whatever type of entity and if its null then make it just not spawn?
[lua] timer.Simple(0.3,function() if IsValid(ent) then ParticleEffectAttach("aurora_02b",PATTACH_ABSORIGIN_FOLLOW,ent,0) end end) [/lua]
Sorry, you need to Log In to post a reply to this thread.