| 06-09-2004, 07:32 PM | #1 |
ok I really need help, this trigger wont work. what it is supposed to do is after the 'Timer' ends it displays a few messages then moves evey1 to a region, waits a certain amount of time then judges the pigs. Then the winner is displayed and the game is over. I did some debugging and figured out its my event. the event is this; Code:
Time - Timer expires(Timer being the varible set to the last created timer) Now I know some ppl wont belive me and will want to see the rest of this last trigger so here it is, but its long. Code:
End Pig Contest
Events
Time - Timer expires
Conditions
Actions
Countdown Timer - Destroy TimerWindow
Unit - Add A peon-type unit classification to PigOne
Unit - Add A peon-type unit classification to PigTwo
Unit - Add A peon-type unit classification to PigThree
Unit - Add A peon-type unit classification to PigFour
Unit - Add A peon-type unit classification to PigFive
Game - Display to (All players) the text: TIME IS UP!!! The j...
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A peon-type unit) Equal to True
Then - Actions
Unit - Move (Picked unit) instantly to (Center of StartEnd <gen>)
Else - Actions
-------- Player One Wins --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer(PigSizeOne)) Greater than (Integer(PigSizeTwo))
(Integer(PigSizeOne)) Greater than (Integer(PigSizeThree))
(Integer(PigSizeOne)) Greater than (Integer(PigSizeFour))
(Integer(PigSizeOne)) Greater than (Integer(PigSizeFive))
Then - Actions
Game - Display to (All players) the text: ((Name of Player 1 (Red)) + wins!)
Wait 10.00 seconds
Game - Victory Player 1 (Red) (Skip dialogs, Show scores)
Game - Defeat Player 2 (Blue) with the message: Defeat!
Game - Defeat Player 3 (Teal) with the message: Defeat!
Game - Defeat Player 4 (Purple) with the message: Defeat!
Game - Defeat Player 5 (Yellow) with the message: Defeat!
Else - Actions
-------- Player Two Wins --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer(PigSizeTwo)) Greater than (Integer(PigSizeOne))
(Integer(PigSizeTwo)) Greater than (Integer(PigSizeThree))
(Integer(PigSizeTwo)) Greater than (Integer(PigSizeFour))
(Integer(PigSizeTwo)) Greater than (Integer(PigSizeFive))
Then - Actions
Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + wins!)
Wait 10.00 seconds
Game - Victory Player 2 (Blue) (Skip dialogs, Show scores)
Game - Defeat Player 1 (Red) with the message: Defeat!
Game - Defeat Player 3 (Teal) with the message: Defeat!
Game - Defeat Player 4 (Purple) with the message: Defeat!
Game - Defeat Player 5 (Yellow) with the message: Defeat!
Else - Actions
-------- Player Three Wins --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer(PigSizeThree)) Greater than (Integer(PigSizeOne))
(Integer(PigSizeThree)) Greater than (Integer(PigSizeTwo))
(Integer(PigSizeThree)) Greater than (Integer(PigSizeFour))
(Integer(PigSizeThree)) Greater than (Integer(PigSizeFive))
Then - Actions
Game - Display to (All players) the text: ((Name of Player 3 (Teal)) + wins!)
Wait 10.00 seconds
Game - Victory Player 3 (Teal) (Skip dialogs, Show scores)
Game - Defeat Player 1 (Red) with the message: Defeat!
Game - Defeat Player 2 (Blue) with the message: Defeat!
Game - Defeat Player 4 (Purple) with the message: Defeat!
Game - Defeat Player 5 (Yellow) with the message: Defeat!
Else - Actions
-------- Player Four Wins --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer(PigSizeFour)) Greater than (Integer(PigSizeOne))
(Integer(PigSizeFour)) Greater than (Integer(PigSizeTwo))
(Integer(PigSizeFour)) Greater than (Integer(PigSizeThree))
(Integer(PigSizeFour)) Greater than (Integer(PigSizeFive))
Then - Actions
Game - Display to (All players) the text: ((Name of Player 4 (Purple)) + wins!)
Wait 10.00 seconds
Game - Victory Player 4 (Purple) (Skip dialogs, Show scores)
Game - Defeat Player 1 (Red) with the message: Defeat!
Game - Defeat Player 2 (Blue) with the message: Defeat!
Game - Defeat Player 3 (Teal) with the message: Defeat!
Game - Defeat Player 5 (Yellow) with the message: Defeat!
Else - Actions
-------- Player Five Wins --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer(PigSizeFive)) Greater than (Integer(PigSizeOne))
(Integer(PigSizeFive)) Greater than (Integer(PigSizeTwo))
(Integer(PigSizeFive)) Greater than (Integer(PigSizeThree))
(Integer(PigSizeFive)) Greater than (Integer(PigSizeFour))
Then - Actions
Game - Display to (All players) the text: ((Name of Player 5 (Yellow)) + wins!)
Wait 10.00 seconds
Game - Victory Player 5 (Yellow) (Skip dialogs, Show scores)
Game - Defeat Player 1 (Red) with the message: Defeat!
Game - Defeat Player 2 (Blue) with the message: Defeat!
Game - Defeat Player 3 (Teal) with the message: Defeat!
Game - Defeat Player 4 (Purple) with the message: Defeat!
Else - ActionsThis piece of code is where I start, dim, and show the timer. This part works FINE, the timer starts, and goes for 25 mins til 0, its the top part that is the problem Code:
Start Pig Contest
Events
Unit - A unit enters Pig Contest <gen>
Conditions
(Owner of (Entering unit)) Equal to Player 1 (Red)
Actions
-------- Game Type --------
Set GameType = Pig Contest
Game - Display to (All players) the text: (GameType + was chosen! At the end of 25 minutes your pigs will be judged, the owner biggest pig wins!)
Countdown Timer - Create a timer window for (Last started timer) with title Time until judgemen...
Set Timer = (Last started timer)
Set TimerWindow = (Last created timer window)
Countdown Timer - Start Timer as a One-shot timer that will expire in 1500.00 seconds
Countdown Timer - Show TimerWindow
Destructible - Kill Summer Tree Wall 0502 <gen>
Destructible - Kill Summer Tree Wall 0214 <gen> |
| 06-09-2004, 08:21 PM | #2 |
May I see the map? |
| 06-09-2004, 08:41 PM | #3 |
I suppose here it is |
| 06-09-2004, 09:05 PM | #4 |
Deleted, oversight. |
| 06-10-2004, 02:45 AM | #5 |
did u take a look at the map linkmaster? |
| 06-11-2004, 02:32 AM | #6 |
common guys this trigger has been perplexing me for 2 weeks now, somone tell me if its impossible to do or what is wrong. :( |
| 06-11-2004, 03:20 AM | #7 |
Your problem starts with your first trigger. You have this: Countdown Timer - Create a timer window for (Last started timer) with title Time until judgemen... Set Timer = (Last started timer) Set TimerWindow = (Last created timer window) Countdown Timer - Start Timer as a One-shot timer that will expire in 1500.00 seconds Countdown Timer - Show TimerWindow You need this: Countdown Timer - Start Timer as a One-shot timer that will expire in 1500.00 seconds Set Timer = (Last started timer) Countdown Timer - Create a timer window for (Last started timer) with title Time until judgemen... Set TimerWindow = (Last created timer window) Countdown Timer - Show TimerWindow You were setting the variable to the last started timer before you started the timer. The Countdown still displayed but the variable was never set so it didnt end. |
| 06-11-2004, 03:52 AM | #8 |
I did what u said and more, still doesnt work :/ I really dont get this trigger, this is the weirdest thing oh and under the trigger Countdown Timer - Start Timer u can start the last started timer, expiring timer, or a varible...why would u want to start the last started timer? |
| 06-11-2004, 04:06 AM | #9 |
OMG I got it to WORK!! :D |
