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
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#41
RE: Using a Single Crowbar on Multiple Doors

You can try setting a string variable to what door is being used.

SetLocalVarString("CurrentDoor", asEntity);

CreateParticleSystemAtEntity("", "ps_hit_wood.ps", GetLocalVarString("CurrentDoor"), false);

Derp.
(This post was last modified: 09-22-2014, 08:19 PM by Neelke.)
09-22-2014, 08:19 PM
Find
AGP Offline
Senior Member

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

Where would the SetLocalVarString be placed?

09-22-2014, 08:23 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#43
RE: Using a Single Crowbar on Multiple Doors

Right when you use the crowbar on a door. There's no need to check which entity it's being used at.

Derp.
09-22-2014, 08:27 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#44
RE: Using a Single Crowbar on Multiple Doors

No, that's not gonna help, since she wants it to happen at an area, which hasn't been used before. Therefore asEntity would not be a possibility.

I know my solution works. I also know why it didn't work.

It shouldn't be +asParent. It should be +asChild

I hadn't checked what was asParent and asChild in your script.


So everything must be like this:

Areas named like: "AreaEffect_AreaBreak_1"

Script looking like:
PHP Code: (Select All)
CreateParticleSystemAtEntity("""ps_hit_wood.ps""AreaEffect_"+asChildfalse);
    
PlaySoundAtEntity("""break_wood_metal""AreaEffect_"+asChild0false); 

Trying is the first step to success.
(This post was last modified: 09-22-2014, 08:32 PM by FlawlessHappiness.)
09-22-2014, 08:29 PM
Find
AGP Offline
Senior Member

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

That did it!! +asChild has fixed it!! XD

09-22-2014, 09:07 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#46
RE: [SOLVED] Using a Single Crowbar on Multiple Doors

Woop! We have done it! The issue has been fixed! Wubwubwubwubwub!

I hope you learned something!

Trying is the first step to success.
09-22-2014, 09:36 PM
Find
AGP Offline
Senior Member

Posts: 448
Threads: 45
Joined: Dec 2012
Reputation: 23
#47
RE: [SOLVED] Using a Single Crowbar on Multiple Doors

A lot! Really! Thanks ever so much!!

09-22-2014, 09:53 PM
Find




Users browsing this thread: 1 Guest(s)