Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Door slams in your face.
Angerpull Offline
Member

Posts: 88
Threads: 24
Joined: Jun 2011
Reputation: 0
#4
RE: Door slams in your face.

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);
}
________________________________________________________
(This post was last modified: 06-27-2011, 12:01 AM by Angerpull.)
06-26-2011, 11:51 PM
Find


Messages In This Thread
Door slams in your face. - by Angerpull - 06-26-2011, 10:49 PM
RE: Door slams in your face. - by Rownbear - 06-26-2011, 11:27 PM
RE: Door slams in your face. - by Angerpull - 06-26-2011, 11:51 PM
RE: Door slams in your face. - by xtron - 06-26-2011, 11:46 PM
RE: Door slams in your face. - by Rownbear - 06-27-2011, 12:14 AM
RE: Door slams in your face. - by Angerpull - 06-27-2011, 12:27 AM



Users browsing this thread: 1 Guest(s)