Frictional Games Forum (read-only)
Statue Startle Script. - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Statue Startle Script. (/thread-23723.html)



Statue Startle Script. - Gilligan's Hell - 10-28-2013

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?


RE: Statue Startle Script. - Potato - 10-28-2013

From what I can tell, this sounds pretty doable, I think a similar thing was done in La Caza if I understand correctly.


RE: Statue Startle Script. - Gilligan's Hell - 10-28-2013

I Saw another cs do something like this called I Dream.

Still the question is What scripts do i use to make this event?


RE: Statue Startle Script. - Ongka - 10-28-2013

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


RE: Statue Startle Script. - Gilligan's Hell - 10-28-2013

Thanks Big Grin


RE: Statue Startle Script. - daortir - 10-29-2013

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.