- Joined
- Oct 29, 2012
- Messages
- 1,474
HI LOL. -_-
I have a simple trigger that works like this:
'When a farm (there are 5 types) finishes training an animal , it automatically trains another one . If the animals' number isn't max , the animals are level 1 . But if the animals' number is max ( of course after training the unit ) , one random unit from all animals with same type becomes level 2 . But the weird thing is :
it's happening to Player 1 only , All other players don't have their animals upgrades even with max animals which 200 or 300 ( depends on mode ) . Well I tried to make ' Game - Show to all players number of current animals' which is AniCount . It was O.K
AND ALSO OTHER PLAYERS HAVE THEIR ANIMALS NOT SPAWNING WHEN THEY REACH MAX ANIMALS , THEY JUST NEED TO START SPAWNING . HERE IS THE TRIGGER :
I have a simple trigger that works like this:
'When a farm (there are 5 types) finishes training an animal , it automatically trains another one . If the animals' number isn't max , the animals are level 1 . But if the animals' number is max ( of course after training the unit ) , one random unit from all animals with same type becomes level 2 . But the weird thing is :
it's happening to Player 1 only , All other players don't have their animals upgrades even with max animals which 200 or 300 ( depends on mode ) . Well I tried to make ' Game - Show to all players number of current animals' which is AniCount . It was O.K
AND ALSO OTHER PLAYERS HAVE THEIR ANIMALS NOT SPAWNING WHEN THEY REACH MAX ANIMALS , THEY JUST NEED TO START SPAWNING . HERE IS THE TRIGGER :
-
Spawned Animals and mercs
-
Events
-
Unit - A unit Finishes training a unit
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Unit-type of (Trained unit)) is Undead) Equal to True
-
-
Then - Actions
-
Set TempPoint = (Rally-Point of (Triggering unit) as a point)
-
Set TempPoint1 = (Position of (Triggering unit))
-
Set TempPoint2 = (TempPoint1 offset by 64.00 towards (Angle from TempPoint1 to TempPoint) degrees)
-
Set TempPlayer = (Owner of (Triggering unit))
-
Set TempInteger = (Player number of TempPlayer)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Trained unit)) Equal to Chicken
-
-
Then - Actions
-
Unit - Order (Triggering unit) to train/upgrade to a Chicken
-
Unit - Remove (Trained unit) from the game
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AniCount[(Player number of (Owner of (Triggering unit)))] Less than AnimalsMaximum
-
-
Then - Actions
-
Unit - Create 1 Chicken for Neutral Victim at TempPoint2 facing Default building facing degrees
-
Unit Group - Add (Last created unit) to AniChicks[(Player number of (Owner of (Triggering unit)))]
-
Set AniCount[(Player number of (Owner of (Triggering unit)))] = (AniCount[(Player number of (Owner of (Triggering unit)))] + 1)
-
Unit - Move (Last created unit) instantly to TempPoint2
-
Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Triggering unit)))
-
Unit - Order (Last created unit) to Move To TempPoint
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AniCount[(Player number of (Owner of (Triggering unit)))] Greater than or equal to AnimalsMaximum
-
-
Then - Actions
-
Set TempUnit = (Random unit from AniChicks[(Player number of (Owner of (Triggering unit)))])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempUnit Not equal to No unit
-
-
Then - Actions
-
Set TempPoint3 = (Position of TempUnit)
-
Unit Group - Remove TempUnit from AniChicks[(Player number of (Owner of (Triggering unit)))]
-
Unit - Remove TempUnit from the game
-
Unit - Create 1 Golden Chicken (Level 2) for Neutral Victim at TempPoint3 facing Default building facing degrees
-
Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Triggering unit)))
-
Unit - Create 1 FeralSpiritEffect for Neutral Passive at TempPoint3 facing Default building facing degrees
-
Animation - Change (Last created unit)'s size to (30.00%, 30.00%, 30.00%) of its original size
-
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Trained unit)) Equal to Sheep
-
-
Then - Actions
-
Unit - Order (Triggering unit) to train/upgrade to a Sheep
-
Unit - Remove (Trained unit) from the game
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AniCount[(Player number of (Owner of (Triggering unit)))] Less than AnimalsMaximum
-
-
Then - Actions
-
Unit - Create 1 Sheep for Neutral Victim at TempPoint2 facing Default building facing degrees
-
Unit Group - Add (Last created unit) to AniSheep[(Player number of (Owner of (Triggering unit)))]
-
Set AniCount[(Player number of (Owner of (Triggering unit)))] = (AniCount[(Player number of (Owner of (Triggering unit)))] + 1)
-
Unit - Move (Last created unit) instantly to TempPoint2
-
Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Triggering unit)))
-
Unit - Order (Last created unit) to Move To TempPoint
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AniCount[(Player number of (Owner of (Triggering unit)))] Greater than or equal to AnimalsMaximum
-
-
Then - Actions
-
Set TempUnit = (Random unit from AniSheep[(Player number of (Owner of (Triggering unit)))])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempUnit Not equal to No unit
-
-
Then - Actions
-
Set TempPoint3 = (Position of TempUnit)
-
Unit Group - Remove TempUnit from AniSheep[(Player number of (Owner of (Triggering unit)))]
-
Unit - Remove TempUnit from the game
-
Unit - Create 1 Black Sheep (Level 2) for Neutral Victim at TempPoint3 facing Default building facing degrees
-
Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Triggering unit)))
-
Unit - Create 1 FeralSpiritEffect for Neutral Passive at TempPoint3 facing Default building facing degrees
-
Animation - Change (Last created unit)'s size to (30.00%, 30.00%, 30.00%) of its original size
-
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Trained unit)) Equal to Pig
-
-
Then - Actions
-
Unit - Order (Triggering unit) to train/upgrade to a Pig
-
Unit - Remove (Trained unit) from the game
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AniCount[(Player number of (Owner of (Triggering unit)))] Less than AnimalsMaximum
-
-
Then - Actions
-
Unit - Create 1 Pig for Neutral Victim at TempPoint2 facing Default building facing degrees
-
Unit Group - Add (Last created unit) to AniPigs[(Player number of (Owner of (Triggering unit)))]
-
Set AniCount[(Player number of (Owner of (Triggering unit)))] = (AniCount[(Player number of (Owner of (Triggering unit)))] + 1)
-
Unit - Move (Last created unit) instantly to TempPoint2
-
Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Triggering unit)))
-
Unit - Order (Last created unit) to Move To TempPoint
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AniCount[(Player number of (Owner of (Triggering unit)))] Greater than or equal to AnimalsMaximum
-
-
Then - Actions
-
Set TempUnit = (Random unit from AniPigs[(Player number of (Owner of (Triggering unit)))])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempUnit Not equal to No unit
-
-
Then - Actions
-
Set TempPoint3 = (Position of TempUnit)
-
Unit Group - Remove TempUnit from AniPigs[(Player number of (Owner of (Triggering unit)))]
-
Unit - Remove TempUnit from the game
-
Unit - Create 1 Fat Pig (Level 2) for Neutral Victim at TempPoint3 facing Default building facing degrees
-
Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Triggering unit)))
-
Unit - Create 1 FeralSpiritEffect for Neutral Passive at TempPoint3 facing Default building facing degrees
-
Animation - Change (Last created unit)'s size to (30.00%, 30.00%, 30.00%) of its original size
-
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Trained unit)) Equal to Rabbit
-
-
Then - Actions
-
Unit - Order (Triggering unit) to train/upgrade to a Rabbit
-
Unit - Remove (Trained unit) from the game
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AniCount[(Player number of (Owner of (Triggering unit)))] Less than AnimalsMaximum
-
-
Then - Actions
-
Unit - Create 1 Rabbit for Neutral Victim at TempPoint2 facing Default building facing degrees
-
Unit Group - Add (Last created unit) to AniRabbits[(Player number of (Owner of (Triggering unit)))]
-
Set AniCount[(Player number of (Owner of (Triggering unit)))] = (AniCount[(Player number of (Owner of (Triggering unit)))] + 1)
-
Unit - Move (Last created unit) instantly to TempPoint2
-
Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Triggering unit)))
-
Unit - Order (Last created unit) to Move To TempPoint
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AniCount[(Player number of (Owner of (Triggering unit)))] Greater than or equal to AnimalsMaximum
-
-
Then - Actions
-
Set TempUnit = (Random unit from AniRabbits[(Player number of (Owner of (Triggering unit)))])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempUnit Not equal to No unit
-
-
Then - Actions
-
Set TempPoint3 = (Position of TempUnit)
-
Unit Group - Remove TempUnit from AniRabbits[(Player number of (Owner of (Triggering unit)))]
-
Unit - Remove TempUnit from the game
-
Unit - Create 1 Green Rabbit (Level 2) for Neutral Victim at TempPoint3 facing Default building facing degrees
-
Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Triggering unit)))
-
Unit - Create 1 FeralSpiritEffect for Neutral Passive at TempPoint3 facing Default building facing degrees
-
Animation - Change (Last created unit)'s size to (30.00%, 30.00%, 30.00%) of its original size
-
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Trained unit)) Equal to Cow
-
-
Then - Actions
-
Unit - Order (Triggering unit) to train/upgrade to a Cow
-
Unit - Remove (Trained unit) from the game
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AniCount[(Player number of (Owner of (Triggering unit)))] Less than AnimalsMaximum
-
-
Then - Actions
-
Unit - Create 1 Cow for Neutral Victim at TempPoint2 facing Default building facing degrees
-
Unit Group - Add (Last created unit) to AniCows[TempInteger]
-
Set AniCount[(Player number of (Owner of (Triggering unit)))] = (AniCount[(Player number of (Owner of (Triggering unit)))] + 1)
-
Unit - Move (Last created unit) instantly to TempPoint2
-
Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Triggering unit)))
-
Unit - Order (Last created unit) to Move To TempPoint
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AniCount[(Player number of (Owner of (Triggering unit)))] Greater than or equal to AnimalsMaximum
-
-
Then - Actions
-
Set TempUnit = (Random unit from AniCows[(Player number of (Owner of (Triggering unit)))])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempUnit Not equal to No unit
-
-
Then - Actions
-
Set TempPoint3 = (Position of TempUnit)
-
Unit Group - Remove TempUnit from AniCows[(Player number of (Owner of (Triggering unit)))]
-
Unit - Remove TempUnit from the game
-
Unit - Create 1 Brown Cow ( Level 2 ) for Neutral Victim at TempPoint3 facing Default building facing degrees
-
Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Triggering unit)))
-
Unit - Create 1 FeralSpiritEffect for Neutral Passive at TempPoint3 facing Default building facing degrees
-
Animation - Change (Last created unit)'s size to (30.00%, 30.00%, 30.00%) of its original size
-
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
-
-
-
-
-
-
-
-
-
Unit - Add Ghost (Visible) to (Last created unit)
-
Custom script: call RemoveLocation(udg_TempPoint)
-
Custom script: call RemoveLocation(udg_TempPoint1)
-
Custom script: call RemoveLocation(udg_TempPoint2)
-
-
Else - Actions
-
Set TempPlayer = (Owner of (Trained unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Trained unit)) Equal to Random Mercenary
-
-
Then - Actions
-
Unit - Remove (Trained unit) from the game
-
Unit - Order (Triggering unit) to train/upgrade to a Random Mercenary
-
Set TempPoint2 = (Random point in revRect[(Random integer number between 1 and 30)])
-
-------- toto ma ostat ake je (jednotky) --------
-
Set TempInteger = (Random integer number between 1 and 14)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player 10 (Light Blue) Food used) Less than 50
-
-
Then - Actions
-
Unit - Create 1 mercType[TempInteger] for Player 10 (Light Blue) at TempPoint2 facing Default building facing degrees
-
Unit - Change color of (Last created unit) to (Color of TempPlayer)
-
AI - Ignore (Last created unit)'s guard position
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempInteger Equal to 7
-
-
Then - Actions
-
Unit Group - Add (Last created unit) to Trappers
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in MercAttackGroup) Greater than 0
-
-
Then - Actions
-
Else - Actions
-
Set TempInt = (Random integer number between 1 and 18)
-
Set TempPoint1 = (Random point in wayRect[TempInt])
-
Unit - Set level of RegionWanderer (Neutral Hostile) for (Last created unit) to TempInt
-
Unit - Order (Last created unit) to Attack-Move To TempPoint1
-
Unit - Create 1 TeleportEffect for Neutral Passive at TempPoint2 facing Default building facing degrees
-
Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
-
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Neutral Hostile Food used) Less than 60
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in MercAttackGroup) Greater than 0
-
-
Then - Actions
-
Else - Actions
-
Set TempInt = (Random integer number between 1 and 18)
-
Set TempPoint1 = (Random point in wayRect[TempInt])
-
Unit - Add RegionWanderer (Neutral Hostile) to (Triggering unit)
-
Unit - Order (Last created unit) to Attack-Move To TempPoint1
-
Unit - Create 1 TeleportEffect for Neutral Passive at TempPoint2 facing Default building facing degrees
-
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
-
-
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation (udg_TempPoint1)
-
Custom script: call RemoveLocation (udg_TempPoint2)
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Trained unit)) Equal to Peon
-
-
Then - Actions
-
Set TempPoint = (Rally-Point of (Triggering unit) as a point)
-
Set TempPoint1 = (Position of (Triggering unit))
-
Set TempPoint2 = (TempPoint1 offset by 64.00 towards (Angle from TempPoint1 to TempPoint) degrees)
-
Unit - Remove (Trained unit) from the game
-
Unit - Create 1 Peon for (Owner of (Triggering unit)) at TempPoint2 facing Default building facing degrees
-
Custom script: call RemoveLocation(udg_TempPoint)
-
Custom script: call RemoveLocation(udg_TempPoint1)
-
Custom script: call RemoveLocation(udg_TempPoint2)
-
-
Else - Actions
-
-
-
-
-
-
Game - Display to (All players) the text: (String(AniCount[(Player number of (Owner of (Triggering unit)))]))
-
-