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


Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"If in an area..." Script Problem
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#3
RE: "If in an area..." Script Problem

AddEntityCollideCallback is the right way to go. Choose int alStates = 0 as parameter so it triggers when entering and leaving. Then add an if-clause in the callback function asking for the state.
Example: AddEntityCollideCallback("Player", "InsideCabinetArea", "CabinetStuff", false, 0);
void CabinetStuff(string &in asParent, string &in asChild, int alState)
{
if(alState == 1) {                //when entering
//disable faint trigger
}
else                 //which would be on alState == -1 which is leaving
{
//enable faint trigger
}
}

10-28-2010, 05:40 PM
Find


Messages In This Thread
"If in an area..." Script Problem - by Dr4konite - 10-28-2010, 04:41 PM
RE: "If in an area..." Script Problem - by SLi78 - 10-28-2010, 04:52 PM
RE: "If in an area..." Script Problem - by Pandemoneus - 10-28-2010, 05:40 PM



Users browsing this thread: 1 Guest(s)