(09-22-2014, 09:29 AM)Mudbill Wrote: See, your particles and sounds are being played at the area named AreaEffect for each door. Because the doors probably aren't in the same location, that won't do well. Try this:
Rename the area for each door to match the placement of it, for example AreaEffect_Door_1 for Door_1.
In the script, do a similar thing as before with the particle and sound script lines. When referencing the "AreaEffect" instead try "AreaEffect_"+GetLocalVarString("Door"). If that string is Door_1, then the name should match the area by Door_1.
Yes, just realized this. *facepalm*
for(int i=1; i<=4; ++i) CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "AreaEffect_"+i, false);
for(int i=1; i<=4; ++i) PlaySoundAtEntity("", "break_wood_metal", "AreaEffect_"+i, 0, false);