| 10-09-2004, 08:44 PM | #1 |
Upgrading
Now this trigger does not work. What it should do in the end is if the house has full mana, replace it. They are all in a unit group for getting gold = to their mana, so they upgrade when mana is full (If happiness is up there). But i cant figure out why it wont work. It only stopped working a while ago. It was working before.Events Time - GameTimer expires Conditions Actions For each (Integer B) from 1 to 10, do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Player((Integer B))) slot status) Equal to Is playing Then - Actions Unit Group - Pick every unit in Residences[(Integer B)] 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 Cottage Happiness[(Integer A)] Greater than 250 (Mana of (Picked unit)) Equal to (Max mana of (Picked unit)) Then - Actions Unit Group - Remove (Picked unit) from Residences[(Player number of (Owner of (Picked unit)))] Unit - Replace (Picked unit) with a House using The new unit's default life and mana Unit - Set mana of (Last replaced unit) to 5.00 Unit Group - Add (Last replaced unit) to Residences[(Player number of (Owner of (Picked unit)))] Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Unit-type of (Picked unit)) Equal to House Happiness[(Integer A)] Greater than 325 (Mana of (Picked unit)) Equal to (Max mana of (Picked unit)) Then - Actions Unit Group - Remove (Picked unit) from Residences[(Player number of (Owner of (Picked unit)))] Unit - Replace (Picked unit) with a Villa using The new unit's default life and mana Wait 1.00 seconds Unit - Set mana of (Last replaced unit) to 10.00 Unit Group - Add (Last replaced unit) to Residences[(Player number of (Owner of (Picked unit)))] Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Unit-type of (Picked unit)) Equal to Hut (Mana of (Picked unit)) Equal to 2.00 Happiness[(Integer A)] Greater than or equal to 150 Then - Actions Unit Group - Remove (Picked unit) from Residences[(Player number of (Owner of (Picked unit)))] Unit - Replace (Picked unit) with a Cottage using The new unit's default life and mana Unit Group - Add (Last replaced unit) to Residences[(Player number of (Owner of (Picked unit)))] Wait 1.00 seconds Unit - Set mana of (Last replaced unit) to 2.00 Else - Actions Do nothing |
| 10-09-2004, 08:46 PM | #2 |
Why oh why did you make it centered? I'm not going to read that. |
| 10-09-2004, 08:48 PM | #3 |
Guest | Hey just type in over that text stuff just teh one with the / goes after the one without it [/code] [code] |
| 10-09-2004, 09:54 PM | #4 |
I am not sure, but try inverting the order of the actions: Unit Group - Remove (Picked unit) from Residences[(Player number of (Owner of (Picked unit)))] Unit - Replace (Picked unit) with a Villa using The new unit's default life and mana Do it for all of the "Remove picked unit" action, see if it works then. |
| 10-09-2004, 11:02 PM | #5 | |
Quote:
integer A exists? not in this trigger. It used to work when the trigger needed that integer A= nothing. Try to avoid the waits. values may change during that delay. c ya |
| 10-10-2004, 01:40 AM | #6 |
Worse actually, integer A is a global variable so if any other loop runs while this trigger is on, it's gonna mess up ALL the values. |
| 10-10-2004, 04:44 AM | #7 |
yo ccrew I MUST SAY THAT THOR HAS BLESSAD THE BATTLFIELDS AND FOREST WINDZ BRING TIDINGS OF BLOOD. |
