| 06-07-2004, 02:57 AM | #1 |
ok here the deal, this trigger does absolutley NOTHING...don't know why...What I want it to do is at the end of 25 mins move all farmers and pigs to the StartEnd region and determin which pig is the fattest then give victory to the owner of that pig and defeat to the other 4 players. Here is the trig Code:
End Pig Contest
Events
Time - Timer expires
Conditions
Actions
Countdown Timer - Destroy (Last created timer window)
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
((Unit-type of (Picked unit)) Equal to Farmer) or ((Unit-type of (Picked unit)) Equal to Pig)
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
PigSizeOne Greater than PigSizeTwo
PigSizeOne Greater than PigSizeThree
PigSizeOne Greater than PigSizeFour
PigSizeOne Greater than 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
PigSizeTwo Greater than PigSizeOne
PigSizeTwo Greater than PigSizeThree
PigSizeTwo Greater than PigSizeFour
PigSizeTwo Greater than 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
PigSizeThree Greater than PigSizeOne
PigSizeThree Greater than PigSizeTwo
PigSizeThree Greater than PigSizeFour
PigSizeThree Greater than 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
PigSizeFour Greater than PigSizeOne
PigSizeFour Greater than PigSizeTwo
PigSizeFour Greater than PigSizeThree
PigSizeFour Greater than 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
PigSizeFive Greater than PigSizeOne
PigSizeFive Greater than PigSizeTwo
PigSizeFive Greater than PigSizeThree
PigSizeFive Greater than 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 next trig only works the FIRST time you feed the pig, dont know why tho....what I want it to do is work EVERY time you feed the pig. Code:
P1 Feed Pig Water
Events
Unit - A unit Acquires an item
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
((Unit-type of (Triggering unit)) Equal to Pig) and ((Item-type of (Item being manipulated)) Equal to Water)
Actions
Animation - Change (Triggering unit)'s size to (103.00%, 103.00%, 103.00%) of its original size
Item - Remove (Item being manipulated)
Set PigSizeOne = (PigSizeOne + 1) |
| 06-07-2004, 11:00 AM | #2 |
Quite honestly the 1st trigger is so long I doubt anyone will read it. The 2nd one, however, is easy enough. You say Animation - Change (Triggering unit)'s size to (103.00%, 103.00%, 103.00%) of its original size Well, it says Original size. So, it would change size once and never again., because it is always changing to the exact same size. So, this is what you do: Make a variable standing for big fatness Increase this variable by 3 every time the trigger runs Resize the pig to 100+ the variable. |
| 06-07-2004, 02:51 PM | #3 |
ok first, I don't understand what you said john. As for the 1st trigger...it's not that long it's just this Code:
End Pig Contest
Events
Time - Timer expires
Conditions
Actions
Countdown Timer - Destroy (Last created timer window)
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
((Unit-type of (Picked unit)) Equal to Farmer) or ((Unit-type of (Picked unit)) Equal to Pig)
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
PigSizeOne Greater than PigSizeTwo
PigSizeOne Greater than PigSizeThree
PigSizeOne Greater than PigSizeFour
PigSizeOne Greater than 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 |
| 06-07-2004, 04:30 PM | #4 |
For the first trigger, try changing (picked player/unit) to (matching player/unit) |
| 06-07-2004, 08:18 PM | #5 |
Ok... Look. You said this: Animation - Change (Triggering unit)'s size to (103.00%, 103.00%, 103.00%) of its original size That wont work because it sets it to the same size every time (103%) because its setting it to 103% of the normal pig, non fed. You need to increase how big it is each time, and do so with a variable. |
| 06-07-2004, 08:43 PM | #6 | |
Quote:
uhh...so... are you saying... make an integer varible that starts at 103 and each time the trigger runs and 100 to it? and have it say; Animation - Change (Triggering unit)'s size to (varible%, varible%, varible%) of its original size ??? |
| 06-07-2004, 09:25 PM | #7 |
Almost... The variable will start at 100 (the normal size of the pig) and increase by 3% (because thats how much bigger the big should get). The trigger is correct. BTW: You can ask more then one question in a thread. |
