liamthespy
Junior Member
Posts: 26
Threads: 10
Joined: Jun 2012
Reputation:
0
|
these planks refuse to die!
Long story short, I have planks that need to disappear. I wanted them to die in a sort of, "takes-damage" way, but deactivating them doesn't even work.
I've tried this
Quote:void firstcollapse(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("plank01", false);
SetEntityActive("plank02", false);
SetEntityActive("plank03", false);
SetEntityActive("plank04", false);
SetPropActiveAndFade("plank01", false, 0);
SetPropActiveAndFade("plank02", false, 0);
SetPropActiveAndFade("plank03", false, 0);
SetPropActiveAndFade("plank04", false, 0);
}
and here's how it activates;
Quote:SetEntityPlayerInteractCallback("door", "scene", true);
AddEntityCollideCallback("Player", "plankcollapse", "firstcollapse", true, 1);
Quote:void scene(string &in asEntity)
{
SetEntityActive("plankcollapse", true);
}
Basically, you're on a bridge and go past an area called plankcollapse, but it's deactivated. You interact with a door which causes the area to activate and then when you run through it, it should destroy the planks. SCRIPT, Y U NO? Also, I have tried setting prop health as well; it doesn't work either.
|
|
07-19-2012, 05:51 PM |
|
Steve
Member
Posts: 178
Threads: 17
Joined: Jun 2012
Reputation:
7
|
RE: these planks refuse to die!
Maybe you could try to set the area active and put the:
AddEntityCollideCallback("Player", "plankcollapse", "firstcollapse", true, 1);
in Void scene instead of making the area active
CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
|
|
07-19-2012, 06:06 PM |
|
liamthespy
Junior Member
Posts: 26
Threads: 10
Joined: Jun 2012
Reputation:
0
|
RE: these planks refuse to die!
tried it, didn't change anything though.
|
|
07-19-2012, 06:19 PM |
|
Steve
Member
Posts: 178
Threads: 17
Joined: Jun 2012
Reputation:
7
|
RE: these planks refuse to die!
try removing the:
SetEntityActive("plank01", false);
SetEntityActive("plank02", false);
SetEntityActive("plank03", false);
SetEntityActive("plank04", false);
and make sure to check if the names are correct and did'n't forfot to press enter after writing the name.
CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
|
|
07-19-2012, 06:25 PM |
|
liamthespy
Junior Member
Posts: 26
Threads: 10
Joined: Jun 2012
Reputation:
0
|
RE: these planks refuse to die!
nope, still no dice.
|
|
07-19-2012, 06:35 PM |
|
Steve
Member
Posts: 178
Threads: 17
Joined: Jun 2012
Reputation:
7
|
RE: these planks refuse to die!
could you send me the rest of the code maybe you have something wrong there taht messes this part up. I can't really find an error in this part.
CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
|
|
07-19-2012, 06:37 PM |
|
liamthespy
Junior Member
Posts: 26
Threads: 10
Joined: Jun 2012
Reputation:
0
|
RE: these planks refuse to die!
I feel like it's something to do with the codes I'm using, can you think of any alternative ones to those I've already tried? the planks are static objects, not entities, which I don't usually work with.
|
|
07-19-2012, 06:42 PM |
|
Steve
Member
Posts: 178
Threads: 17
Joined: Jun 2012
Reputation:
7
|
RE: these planks refuse to die!
maybe if you use the (entitie) planks from gameplay called "lift_wood" and check Staticphysics, it might work.
CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
|
|
07-19-2012, 06:47 PM |
|
liamthespy
Junior Member
Posts: 26
Threads: 10
Joined: Jun 2012
Reputation:
0
|
RE: these planks refuse to die!
that worked, thanks too bad those other planks wouldn't cooperate though
|
|
07-19-2012, 07:28 PM |
|
Steve
Member
Posts: 178
Threads: 17
Joined: Jun 2012
Reputation:
7
|
RE: these planks refuse to die!
no problem. I always like to help people
CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
|
|
07-19-2012, 07:57 PM |
|
|