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.
Gilligan's Hell Offline
Posting Freak

Posts: 851
Threads: 17
Joined: Feb 2012
Reputation: 36
#1
Statue Startle Script.

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?

The International Narcotics Traffic
10-28-2013, 07:43 PM
Find
Potato Offline
Senior Member

Posts: 678
Threads: 10
Joined: Jun 2012
Reputation: 37
#2
RE: Statue Startle Script.

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

[Image: o8JPTkt.jpg]
upsilon floorbot is a qt pa2t
10-28-2013, 08:26 PM
Find
Gilligan's Hell Offline
Posting Freak

Posts: 851
Threads: 17
Joined: Feb 2012
Reputation: 36
#3
RE: Statue Startle Script.

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

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

The International Narcotics Traffic
(This post was last modified: 10-28-2013, 09:11 PM by Gilligan's Hell.)
10-28-2013, 08:29 PM
Find
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
Gilligan's Hell Offline
Posting Freak

Posts: 851
Threads: 17
Joined: Feb 2012
Reputation: 36
#5
RE: Statue Startle Script.

Thanks Big Grin

The International Narcotics Traffic
10-28-2013, 10:18 PM
Find
daortir Offline
Senior Member

Posts: 422
Threads: 9
Joined: Sep 2013
Reputation: 18
#6
RE: Statue Startle Script.

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.

10-29-2013, 03:47 PM
Find




Users browsing this thread: 1 Guest(s)