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
Script Help How to achieve this scenario?
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#5
RE: How to achieve this scenario?

(01-30-2013, 01:54 AM)serbusfish Wrote: The scenario;

You enter a room, the sound of a plate or vase smashing is heard from another room, the centre dot 'looks' to where the sound came from, then the sound of a monster walking is heard followed by the sound of a door shutting.

How would I go about doing this? I have the actual level built ready, I just have no clue about scripting, I understand the basic idea of it but I cant just open up a text doc and type in what I want to do, whereas I have no problem opening the level editor and building a random set of aesthetically pleasing rooms (imo Smile).

Okay, it would be like this:

void OnStart()
{
AddEntityCollideCallback("Player", "Area", "Stuff", true, 1); //The area is when you enter the room.
}

void Stuff (string &in asParent, string &in asChild, int alState)
{
SetPropHealth("Vase_to_be_broken", 0);
StartPlayerLookAt("Area_to_look_at", 1, 1, ""); ///The numbers can change if necessary
AddTimer("", 1, "Sound");
}

void Sound (string &in asEntity)
{
///Play monster walking sound
AddTimer("", 1, "Anothersound");
}

void Anothersound (string &in asTimer)
{
///Door shutting sound
StopPlayerLookAt();
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 01-30-2013, 12:14 PM by The chaser.)
01-30-2013, 09:35 AM
Find


Messages In This Thread
How to achieve this scenario? - by serbusfish - 01-30-2013, 01:54 AM
RE: How to achieve this scenario? - by NaxEla - 01-30-2013, 02:28 AM
RE: How to achieve this scenario? - by serbusfish - 01-30-2013, 04:07 AM
RE: How to achieve this scenario? - by The chaser - 01-30-2013, 09:35 AM
RE: How to achieve this scenario? - by serbusfish - 01-31-2013, 01:58 AM
RE: How to achieve this scenario? - by serbusfish - 01-31-2013, 05:30 PM
RE: How to achieve this scenario? - by serbusfish - 02-01-2013, 04:09 AM
RE: How to achieve this scenario? - by The chaser - 02-01-2013, 10:28 AM
RE: How to achieve this scenario? - by serbusfish - 02-01-2013, 05:04 PM
RE: How to achieve this scenario? - by Kreekakon - 02-01-2013, 05:17 PM
RE: How to achieve this scenario? - by serbusfish - 02-03-2013, 03:58 AM
RE: How to achieve this scenario? - by The chaser - 02-03-2013, 11:54 AM
RE: How to achieve this scenario? - by serbusfish - 02-05-2013, 03:29 AM
RE: How to achieve this scenario? - by serbusfish - 02-08-2013, 02:33 AM
RE: How to achieve this scenario? - by serbusfish - 02-08-2013, 01:48 PM



Users browsing this thread: 1 Guest(s)