Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //From my Amnesia Rebirth Tutorial Series
- //Episode 10 Timers and Enemy Spawning
- //https://www.youtube.com/channel/UCHEzyhMw1EALBcJEKVJFmwA
- //-----------------------------------------------------------
- //Creates a timer that runs a function when the time expires
- Map_AddTimer("Timer_HallwayGhoul", 10.0f, "OnTimer_HallwayGhoul");
- //timerName (String)- the name of your timer to reference within your script (not anything in your level).
- //timerTime (float)- the amount of time you want to set the timer for.
- //functionName (String)- the name of the function you wish to execute when the timer expires.
- //Checks if the specified timer exists
- Map_TimerExists("Timer_HallwayGhoul");
- //timerName (String)- the name of your timer to reference within your script (First value in your AddTimer function).
- //Removes a specified timer
- Map_RemoveTimer("Timer_HallwayGhoul");
- //timerName (String)- the name of your timer to reference within your script (First value in your AddTimer function).
- //Pause an existing timer
- Map_SetTimerPaused("Timer_HallwayGhoul", true);
- //timerName (String)- the name of your timer to reference within your script (First value in your AddTimer function).
- //pause (bool)- should the timer be paused true or false
- //Get the time left on a timer
- Map_GetTimerTime("Timer_HallwayGhoul");
- //timerName (String)- the name of your timer to reference within your script (First value in your AddTimer function).
- //If called from within a timer function it will restart the timer to the specified time
- Map_RestartCurrentTimer(5.0f);
- //timerTime (float)- the amount of time the timer should be recreated with.
- //Checks to see if a timer has already expired and recreates the timer
- Map_TimeHasPassed("Timer_HallwayGhoul", 5.0f);
- //timerName (String)- the name of your timer to reference within your script (First value in your AddTimer function).
- //timerTime (float)- the amount of time the timer should be recreated with.
- //Make an entity in your level active or inactive
- Entity_SetActive("ghoul_hallway", true);
- //entityName (String)- the name of your entity as it appears in your level editor.
- //activate (bool)- should the entity be set active (true) or inactive (false).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement