Thank you for the help, but it doesn't work. I just get the "Unexpected Token" Error. Doesn't seem wrong to me.
////////SCARY DOOR////////////
//The Door
{
AddEntityCollideCallback("Player", "DoorScare", "OpenDoor", true, 1);
}
void OpenDoor(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("Door", 50, 0, 50, "World");
}
////////////////////////////
Any Errors?
(06-26-2011, 11:46 PM)xtron Wrote: use this:
SetSwingDoorClosed("DOORNAME", true, true);
SetSwingDoorLocked("DOORNAME", false, true);
And it will slam and lock it self.
Thank you! But the door doesn't Lock itself. It's still open. Anything wrong?
___________________________________________________________
void OnStart()
{
AddEntityCollideCallback("Player" , "Monsterscare" , "MonsterFunc1" , true , 1);
AddEntityCollideCallback("Player" , "Monsterscare2" , "MonsterFunc2" , true , 1);
AddEntityCollideCallback("Player", "DoorScare", "OpenDoor", true, 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monster_scare" , true);
ShowEnemyPlayerPosition("Monster_scare");
GiveSanityDamage(20, true);
}
void MonsterFunc2(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monster_scare2" , true);
ShowEnemyPlayerPosition("Monster_scare2");
GiveSanityDamage(10, true);
}
void OpenDoor(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("ScaryDoor", true, true);
SetSwingDoorLocked("ScaryDoor", false, true);
}
________________________________________________________