Frictional Games Forum (read-only)

Full Version: these planks refuse to die!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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
tried it, didn't change anything though.
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.
nope, still no dice.
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.
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.
maybe if you use the (entitie) planks from gameplay called "lift_wood" and check Staticphysics, it might work.
that worked, thanks Big Grin too bad those other planks wouldn't cooperate though
no problem. I always like to help people Big Grin