Timers: Difference between revisions
Jump to navigation
Jump to search
Braindawg1 (talk | contribs) |
(Updated the Text-Based Timer info to include my new version of the timer. Allows more customization and is all around more stable) |
||
Line 7: | Line 7: | ||
=== Text-Based Timer === | === Text-Based Timer === | ||
# Add the template to your mission by adding <code>#base | # 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 of text at the top of each of your Wave{} blocks<syntaxhighlight lang="javascript"> | ||
# Send | SpawnTemplate texttimerv2 | ||
InitWaveOutput | |||
{ | |||
Target gamerules | |||
Action runscriptcode | |||
//////////////////////////////////////////////////////////////////////////////// | |||
// ::clock <- `minutes|seconds|color|logic_relay triggered on depleted timer` | |||
Param "::clock <- `10|00|0 255 255|timerfinish1`" | |||
//////////////////////////////////////////////////////////////////////////////// | |||
} | |||
</syntaxhighlight> | |||
# Send a <code>SetValue</code> input to <code>addtime</code> with a parameter of a number to add or remove time from 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 | |||
=== Boss Bar Timer === | === Boss Bar Timer === |
Revision as of 16:11, 25 September 2023
Two 15 minute timer templates that will fail the wave once reaching zero. One is text based while the other utilizes the Halloween boss health bar. Instructions on how to change the countdown time can be found in the template files listed below.
How to use
Both timers are simple to use and can be added into any mission running on our servers.
Text-Based Timer
- Add the template to your mission by adding
#base reverse_timer_text_v2.pop
to the top of your popfile - Add this block of text at the top of each of your Wave{} blocks
SpawnTemplate texttimerv2 InitWaveOutput { Target gamerules Action runscriptcode //////////////////////////////////////////////////////////////////////////////// // ::clock <- `minutes|seconds|color|logic_relay triggered on depleted timer` Param "::clock <- `10|00|0 255 255|timerfinish1`" //////////////////////////////////////////////////////////////////////////////// }
- Send a
SetValue
input toaddtime
with a parameter of a number to add or remove time from the timer - Send a
CallScriptFunction
input totimerdisplay
with a parameter oftimerpause
to pause the timer, ortimerunpause
to unpause instead
Boss Bar Timer
- Add the template to your mission by adding
#base reverse_timer.pop
to the top of your popfile - Add
SpawnTemplate "timertest" [$SIGSEGV]
to WaveSchedule, same place as StartingCurrency - Trigger
showtimer
using a WaveSpawn output such as FirstSpawnOutput to display the bar on the HUD - Trigger
timer_relay
to begin the countdown - Send the
CancelPending
input totimer_relay
instead ofTrigger
to pause the timer, it can be restarted by re-triggering
Boss bar limitations:
- Only one Tank/Chief boss bar can be present at once without overlapping
- Overrides Halloween boss bar, meaning a Halloween boss cannot be used alongside this
- Size of the bar cannot be changed, only the rate it decreases
Templates
Text based timer: https://testing.potato.tf/tf/scripts/population/reverse_timer_text.pop
Boss bar timer: https://testing.potato.tf/tf/scripts/population/reverse_timer.pop