This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| prpl:operatewhilepaused [2016/12/02 23:33] – external edit 127.0.0.1 | prpl:operatewhilepaused [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | <- [[.: | + | <- [[.: |
| - | ===== | + | ===== |
| ^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
| - | | | | [ - ] | | + | | bool | | [ bool - ] | |
| === Description === | === Description === | ||
| + | Set whether the Core will operate while the game is paused. Good for animations or buttons. | ||
| + | |||
| + | This may need to be called in :awake to guard against save/load. (Untested, may work without) | ||
| + | |||
| + | This command is per script, not per Core. So, should a Core carry multiple copies of a script, or muliple different scripts, some may OperateWhilePaused while others do not. | ||
| + | |||
| + | [[.: | ||
| + | |||
| + | Note: This command must be run before taking effect - place in [[,: | ||
| + | |||
| + | Note: It is recommended to disable this mode in [[,; | ||
| === Examples === | === Examples === | ||
| - | < | + | < |
| - | + | once | |
| - | </code> | + | |
| + | 0 ->CirclePoint | ||
| + | endonce | ||
| + | GetMousePosition CurrentPixelCoords Distance 6 lt if #Mouseover | ||
| + | " | ||
| + | endif | ||
| + | |||
| + | IsPaused if | ||
| + | return #Only go on if the game is running | ||
| + | endif | ||
| + | |||
| + | |||
| + | #We shall move in a circle around the lower-left corner of the map. But not if the game is paused. | ||
| + | < | ||
| + | Self | ||
| + | < | ||
| + | < | ||
| + | SetUnitPixelCoords | ||
| + | |||
| + | :awake | ||
| + | 1 OperateWhilePaused | ||
| + | | ||
| + | :destroyed | ||
| + | 0 OperateWhilePaused | ||
| + | </ | ||