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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Statue Startle Script.
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#4
RE: Statue Startle Script.

void OnStart()
{
AddEntityCollideCallback("Player", "AreaActivateStatue1", "CollideAreaStatue1", true, 1);
}

void CollideAreaStatue1(string &in asParent, string &in asChild, int alState)
{
AddEntityCollideCallback("Player", "AreaActivateStatue2", "CollideAreaStatue2", true, 1);
SetEntityActive("statue1", false);
SetEntityActive("statue3", true);
}

void CollideAreaStatue2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("statue2", false);
SetEntityActive("statue4", true);
}
Statue 1 and 3 are the ones who stood in the right place, 2 and 4 are the "moved" ones.
Just place 4 statues and set number 2 and 4 inactive and put them in the place where you want them to spawn. Call your ScriptBoxes AreaActivateStatue1 and AreaActivateStatue2.
AreaActivateStatue2
only gets triggered if you already walked into the first one. (Just put the collidecallback in OnStart if you don't want this.)
Make sure you use entity statues and not static objects.
You can add sounds and other stuff to make it a bit more fancy Wink

[Image: 18694.png]
(This post was last modified: 10-28-2013, 10:15 PM by Ongka.)
10-28-2013, 10:14 PM
Find


Messages In This Thread
Statue Startle Script. - by Gilligan's Hell - 10-28-2013, 07:43 PM
RE: Statue Startle Script. - by Potato - 10-28-2013, 08:26 PM
RE: Statue Startle Script. - by Gilligan's Hell - 10-28-2013, 08:29 PM
RE: Statue Startle Script. - by Ongka - 10-28-2013, 10:14 PM
RE: Statue Startle Script. - by Gilligan's Hell - 10-28-2013, 10:18 PM
RE: Statue Startle Script. - by daortir - 10-29-2013, 03:47 PM



Users browsing this thread: 1 Guest(s)