-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started | Yielding methods
These allow your script to "wait" for a certain amount of time, allowing you to delay certain actions, instead of running everything at once.
Very simple! The shelp methods command has a category called Yielding, where you can find yielding methods.
Note
There are some methods that are yielding, but are not in the category e.g. the RunScriptAndWait method.
The simplest there is, its only argument is duration, meaning for how long should the script wait.
# Waits for 5 seconds
Wait 5s
# Waits for half a second
Wait 0.5s
# Waits for 15 milliseconds
Wait 15ms
# Waits for 5 minutes
Wait 5m
# Waits for half an hour
Wait .5h
This is a much more advanced method, which will wait until a certain condition evaluates to true.
# Waits until the method {RoundInfo hasEnded} will return true, meaning the end of a round
WaitUntil ({RoundInfo hasEnded} == true)
# Waits until the method {AmountOf @scpPlayers} will return 0, meaning 0 alive SCPs
WaitUntil ({AmountOf @scpPlayers} == 0)
Note
WaitUntil method uses conditions and value returning methods, which will be covered later down the tutorial series.
This is just an example of what's possible.
(These tutorials are ordered, start from the top)