1: (the castle part)
This should work: (Make sure these have "deactivate on success is true" NOT checked on all these scripts.)
Make a script that says that If "Player1 captures building" Then "Set flag 'castle is controlled1' to 'true'"
Make another script that says that If "'Castle is controlled1' is 'True'" Then "Set Timer 'Timer castle controlled1' to expire in '###' seconds" and "Enable script 'stop timer1'" and "Set Flag 'castle is controlled2' to 'False'"
Make a script named "stop timer1" and have it disabled. Have its settings be If "Flag named 'Castle is controlled2' is True" Then "timer 'Timer castle controlled1' stops and "Flag named 'Castle is controlled1' is set to 'False'" and "Disable script 'Stop Timer1 (this one)'
Make another script that says that If "Player2 captures building" Then "Set flag 'castle is controlled2' to 'true'"
Make another script that says that If "'Castle is controlled2' is 'True'" Then "Set Timer 'Timer castle controlled2' to expire in '###' seconds" and "Enable script 'stop timer12" and "Set Flag 'castle is controlled1' to 'False'"
Make a script named "stop timer2" and have it disabled. Have its settings be If "Flag named 'Castle is controlled1' is True" Then "timer 'Timer castle controlled2' stops and "Flag named 'Castle is controlled2' is set to 'False'" and "Disable script 'Stop Timer2 (this one)'
EDIT-- Continue with this pattern for more then 2 players, but you will need to add more and more to each script for it to work (Ex: the 1 with disable flag1 will need to say flag1,3,&4)
For quick reference look at this:
flag 1: Says that player1 has flag
flag 2: says that player2 has flag
timer 1: player 1 win
timer 2: player 2 win
1. player captures flag makes flag1 true
2. flag 1 true makes timer 1 expire
" " makes 3 enabled.
3. (D) flag 2 true makes timer 1 stop
" " 3 disabled.
" " flag 1 disabled
4. player2 captures flag makes flag2 true
5. flag 2 true makes timer 2 expire
" " makes 6 enabled.
6. (D) flag 1 true makes timer 2 stop
" " 3 disabled.
" " flag 2 disabled
Some Notes: You will need to figure out a way to set each player to it's own named team. Also: look for a topic that I made with FAQ's on it (should be in mapping & modding) for the 2nd part, or just open an AOD for reference.
Edited by user Friday, November 3, 2006 8:31:46 PM(UTC)
| Reason: Not specified