The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Some Scripting Help Please!
KikoKuruma Offline
Junior Member

Posts: 23
Threads: 5
Joined: Jun 2011
Reputation: 0
#1
Need Some Scripting Help Please!

Hey guys, im trying to script an event where after you start the map, a timer waits an amount of time, before opening a door, and making you look at it. i can script the doors and stuff just fine, but im having the most trouble with timers and getting the player to look at the door.

Here's my script.
------------------------------------------------
void OnStart()
{
AddTimer("", 5f, "Event1");
}

////////////////////////////
// This is the first event to lead the player out of the First room
void Event1(string &in asTimer)
{
GiveSanityDamage(20, true);
StartPlayerLookAt("Door1", 3, 5, "Effects1");
Addtimer("", 2f, "Door1un");
Addtimer("", 5f, "Normal1start");
}
void Door1un(string &in asTimer)
{

}
void Normal1start(string &in asTimer)
{

}
----------------------------------------------------
So im trying to use timers to pace out certain events, the first one to start the whole cycle, the second one to unlock and open the door, and to make some visual effects happen, and the third one to stop forcing the player to look at the door. i also dont quite understand the part of the StartPlayerLookAt function where it needs a call back...
Can anyone Help?
(This post was last modified: 06-25-2011, 07:52 PM by KikoKuruma.)
06-25-2011, 07:17 PM
Find


Messages In This Thread
Need Some Scripting Help Please! - by KikoKuruma - 06-25-2011, 07:17 PM
RE: Need Some Scripting Help Please! - by Kyle - 06-25-2011, 07:33 PM
RE: Need Some Scripting Help Please! - by Kyle - 06-25-2011, 07:44 PM



Users browsing this thread: 1 Guest(s)