Please. I've been trying to do this by having the enemy walk into a script area that says to open the door. But it doesn't work. Can anyone think of a better method, or should this definitely work and there's just something wrong with my code?
also i noticed this door acts like its hinges are greased or something cuz when I open it, it starts to move back closed. I don't mean open it a little, I mean, I open it all the way, it bounces back and starts slowly closing, so I have to carefully place the door open.
It's actually kinda funny cuz one time it closed on my enemy after it walked into the room and it had to break through it to get out.
But yeah, please help.
void CollideAreaTest03(string &in asParent, string &in asChild, int alState)
{
if(GetSwingDoorLocked("door1")==false){
//SetMoveObjectStateExt("door1", 1, 0.9, 1, 0.2, true);
//SetMoveObjectState("door1", 1);
SetSwingDoorClosed("door1", false, false);
}
}
and in OnEnter, i have:
AddEntityCollideCallback("brute1", "EnemyAtDoor", "CollideAreaTest03", false, 1);