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
Script - Piano Music
Spelos Away
Banned

Posts: 231
Threads: 19
Joined: Sep 2014
#17
RE: Script - Piano Music

PHP Code: (Select All)
SetPlayerActive(false); 
Makes the player unable to move or look around.
You put that into a function that runs as you want it to happen.
That means that if you want player to NOT be able to move as the custom story starts, you put that command into an OnStart() function.

PHP Code: (Select All)
AddTimer(""7.0f"MyTimerFunc"); 
Adds a timer that will run MyTimerFunc function after 7.0f Seconds.
You put that into a function that runs as you want the timer to start.
That means that if you want "MyTimerFunc" to happen after 7 seconds FROM the beginning of your custom story, you put that command into an OnStart() function.

PHP Code: (Select All)
void MyTimerFunc(string &in asTimer)
{


Is a FUNCTION that the previous Timer will call.
Everything in this function will happen after 7.0f Second specified in the Timer command.
If you want player to start moving at this point, put
PHP Code: (Select All)
SetPlayerActive(true); 
command in this function.

Full script should look something like this:
PHP Code: (Select All)
void OnStart()
{
    
SetPlayerActive(false);
    
AddTimer(""7.0f"MyTimerFunc");
}

void MyTimerFunc(string &in asTimer)
{
    
SetPlayerActive(true);

02-28-2016, 12:45 PM
Find


Messages In This Thread
Script - Piano Music - by Abihishi - 02-26-2016, 02:47 PM
RE: Script - Piano Music - by Spelos - 02-26-2016, 03:09 PM
RE: Script - Piano Music - by Abihishi - 02-26-2016, 04:47 PM
RE: Script - Piano Music - by Spelos - 02-26-2016, 05:51 PM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 10:32 AM
RE: Script - Piano Music - by Spelos - 02-27-2016, 11:03 AM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 11:55 AM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 01:19 PM
RE: Script - Piano Music - by Spelos - 02-27-2016, 01:32 PM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 02:54 PM
RE: Script - Piano Music - by Spelos - 02-27-2016, 03:16 PM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 03:50 PM
RE: Script - Piano Music - by Spelos - 02-27-2016, 03:58 PM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 06:37 PM
RE: Script - Piano Music - by Spelos - 02-27-2016, 07:21 PM
RE: Script - Piano Music - by Abihishi - 02-28-2016, 12:11 PM
RE: Script - Piano Music - by Spelos - 02-28-2016, 12:45 PM
RE: Script - Piano Music - by Abihishi - 02-28-2016, 12:51 PM
RE: Script - Piano Music - by Spelos - 02-28-2016, 01:04 PM
RE: Script - Piano Music - by Mudbill - 02-28-2016, 06:02 PM
RE: Script - Piano Music - by Spelos - 02-28-2016, 08:12 PM
RE: Script - Piano Music - by Abihishi - 02-29-2016, 05:35 PM
RE: Script - Piano Music - by Spelos - 02-29-2016, 07:41 PM
RE: Script - Piano Music - by Abihishi - 02-29-2016, 08:11 PM
RE: Script - Piano Music - by Abihishi - 03-01-2016, 05:14 PM
RE: Script - Piano Music - by Spelos - 03-01-2016, 05:19 PM
RE: Script - Piano Music - by Abihishi - 03-01-2016, 05:44 PM
RE: Script - Piano Music - by Spelos - 03-01-2016, 05:54 PM
RE: Script - Piano Music - by Abihishi - 03-01-2016, 06:53 PM



Users browsing this thread: 1 Guest(s)