Frictional Games Forum (read-only)

Full Version: Statue Startle Script.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So in one of my maps there is two statues, i want to script an event where the player proceeds to exit the room and he unknowingly steeps into a script box. the script would move le statues near the player to confuse them then they step into another which places them right near the player to startle them.

Is there such way to script this event?
From what I can tell, this sounds pretty doable, I think a similar thing was done in La Caza if I understand correctly.
I Saw another cs do something like this called I Dream.

Still the question is What scripts do i use to make this event?
Code:
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
Thanks Big Grin
You might wanna know that the Statues that can be set active/inactive are the ones in the ptest entity folder, aka the one with chained arms and the angel one.
Armors should work though.