Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help [SOLVED] Using a Single Crowbar on Multiple Doors
AGP Offline
Senior Member

Posts: 448
Threads: 45
Joined: Dec 2012
Reputation: 23
#25
RE: Using a Single Crowbar on Multiple Doors

(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);

09-22-2014, 09:31 AM
Find


Messages In This Thread
RE: Using a Single Crowbar on Multiple Doors - by AGP - 09-22-2014, 09:31 AM



Users browsing this thread: 1 Guest(s)