Merge lp:~armagetronad-ct/armagetronad/0.4-delaycmd into lp:~armagetronad-dev/armagetronad/0.4-armagetronad-work
Status: | Needs review |
---|---|
Proposed branch: | lp:~armagetronad-ct/armagetronad/0.4-delaycmd |
Merge into: | lp:~armagetronad-dev/armagetronad/0.4-armagetronad-work |
Diff against target: |
115 lines (+91/-0) 1 file modified
src/tron/gGame.cpp (+91/-0) |
To merge this branch: | bzr merge lp:~armagetronad-ct/armagetronad/0.4-delaycmd |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Armagetron Advanced Developers | Pending | ||
Review via email: mp+130693@code.launchpad.net |
Description of the change
Hey,
I don't know if it worth including it in mainstream but it happens to be a useful feature for servers like ed's onslaught fortress, mayhem or flower power, and it was just a matter of a few minutes to extract it.
This is the delay_command from sty+ct rewritten a while ago for my experiments on scripting (armagetronad-ct branch). It works the exact same way as in sty+ct:
delay_command [r<repeat_delay>] [+-]<start_delay> <command>
The optional + indicates whether start_delay is relative instead of absolute.
The optional - indicates it should be send before game start (absolute time during countdown)
The repeat option was added by kyle later (may be for some wild fortress maps) and is rather self explanatory.
I allows to avoid external scripting in simple cases like timing messages and scoring (onslaught) or sending stages settings (mayhem).
Some typical example:
delay_command 60 center_message 2 minutes left!
delay_command 37 center_message - 3 -
delay_command 38 center_message - 2 -
delay_command 39 center_message - 1 -
delay_command 40 center_message Stage 2 is starting now!
delay_command 40 cycle_speed 50
...