Editing Timers

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 7: Line 7:
=== Text-Based Timer ===
=== Text-Based Timer ===


# Add the template to your mission by adding <code>#base reverse_timer_text_v2_simple.pop</code> to the top of your popfile
# Add the template to your mission by adding <code>#base reverse_timer_text_v2.pop</code> to the top of your popfile
#Add this block to WaveSchedule, same place as StartingCurrency<syntaxhighlight lang="javascript">
# Add this block of text at the top of each of your Wave{} blocks<syntaxhighlight lang="javascript">
PointTemplates
SpawnTemplate texttimerv2
InitWaveOutput
{
{
texttimerv2_setup
Target gamerules
{
Action runscriptcode
OnSpawnOutput
////////////////////////////////////////////////////////////////////////////////
{
//  ::clock <- `minutes|seconds|color|logic_relay triggered on depleted timer`
Target timerdisplay
Param                 "::clock <- `10|00|0 255 255|timerfinish1`"
Action runscriptcode
////////////////////////////////////////////////////////////////////////////////
Param "timer(10,00,0.7,0.9,`0 255 255`)" // timer(minutes,seconds,xpos,ypos,`color`)
}
}
}
}
SpawnTemplate texttimerv2_setup [$SIGSEGV]
</syntaxhighlight>
</syntaxhighlight>
# Change the Param if needed for time duration, the timer's position on the hud, and the timer text's color
# Send a <code>SetValue</code> input to <code>addtime</code> with a parameter of a number to add or remove time from the timer
Trigger <code>timerpause</code> using a WaveSpawn output such as FirstSpawnOutput to pause or unpause the timer
# Send a <code>CallScriptFunction</code> input to <code>timerdisplay</code> with a parameter of <code>timerpause</code> to pause the timer, or <code>timerunpause</code> to unpause instead
 
Send a <code>SetValue</code> input on <code>addtime</code> to add or remove time from the current timer (e.g. SetValue 120 with a time 3:25 becomes 5:25)
 
Send a <code>SetValue</code> input on <code>settime</code> to set the desired time (e.g SetValue 600 with a time 3:25 becomes 10:00)


=== Boss Bar Timer ===
=== Boss Bar Timer ===
Please note that all contributions to SigMod are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see SigMod:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)