Frictional Games Forum (read-only)
these planks refuse to die! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: these planks refuse to die! (/thread-17101.html)



these planks refuse to die! - liamthespy - 07-19-2012

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.


RE: these planks refuse to die! - Steve - 07-19-2012

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


RE: these planks refuse to die! - liamthespy - 07-19-2012

tried it, didn't change anything though.


RE: these planks refuse to die! - Steve - 07-19-2012

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.


RE: these planks refuse to die! - liamthespy - 07-19-2012

nope, still no dice.


RE: these planks refuse to die! - Steve - 07-19-2012

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.


RE: these planks refuse to die! - liamthespy - 07-19-2012

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.


RE: these planks refuse to die! - Steve - 07-19-2012

maybe if you use the (entitie) planks from gameplay called "lift_wood" and check Staticphysics, it might work.


RE: these planks refuse to die! - liamthespy - 07-19-2012

that worked, thanks Big Grin too bad those other planks wouldn't cooperate though


RE: these planks refuse to die! - Steve - 07-19-2012

no problem. I always like to help people Big Grin