scripting:subgames
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scripting:subgames [2020/02/02 21:17] – mit | scripting:subgames [2023/04/05 11:59] (current) – mit | ||
---|---|---|---|
Line 15: | Line 15: | ||
A general overview of an implementation of a RC duel subgame. (The full script for this as used on Lovelace will be available in the script examples sections): | A general overview of an implementation of a RC duel subgame. (The full script for this as used on Lovelace will be available in the script examples sections): | ||
- | - Firstly - we'll choose an ID number for the subgame. If you've only got one subgame on the world, just using subgame 0 is fine, but if you want to have multiple games running simultaneously you'll need to allocate them different numbers. | + | - Firstly - we'll choose an ID number for the subgame. If you've only got one subgame on the world, just using subgame 0 is fine, but if you want to have multiple games running simultaneously you'll need to allocate them different numbers. |
- Now we get the two players into the subgame together e.g. | - Now we get the two players into the subgame together e.g. | ||
Line 22: | Line 22: | ||
SubgameJoin( $kCrowDuelSubgameID, | SubgameJoin( $kCrowDuelSubgameID, | ||
</ | </ | ||
- | (There are various techniques we can use to decide | + | < |
+ | </ | ||
- .. next we set up the RC game state ; setting the players spawn positions and lives, and locking the weapons | - .. next we set up the RC game state ; setting the players spawn positions and lives, and locking the weapons | ||
< | < | ||
Line 36: | Line 36: | ||
</ | </ | ||
- | - When we're ready to start (again, the [[scripting:: | + | - When we're ready to start (again, the [[scripting:: |
< | < | ||
SubgameActivateScoreboard( $kCrowDuelSubgameID, | SubgameActivateScoreboard( $kCrowDuelSubgameID, | ||
Line 42: | Line 42: | ||
</ | </ | ||
- | - The ' | + | - We'll create the custom |
< | < | ||
+ | Event( " | ||
+ | { | ||
*gocrow %PLAYER% | *gocrow %PLAYER% | ||
*centraltext %PLAYER% Ready up. Round starts in 10 seconds.. | *centraltext %PLAYER% Ready up. Round starts in 10 seconds.. | ||
Line 52: | Line 54: | ||
*unlockweapons %PLAYER% | *unlockweapons %PLAYER% | ||
SubgameSetTimer( $kCrowDuelSubgameID, | SubgameSetTimer( $kCrowDuelSubgameID, | ||
+ | } | ||
</ | </ | ||
scripting/subgames.1580699837.txt.gz · Last modified: 2020/02/02 21:17 by mit