- Joined
- Apr 23, 2011
- Messages
- 322
-
Footman
-
Events
- Unit - A unit Begins training a unit
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Barracks
-
Actions
- Set RatGroup = (Units in Barracks training start <gen> matching ((((Matching unit) is alive) Equal to True) and (((Unit-type of (Matching unit)) Equal to Recruit [1]) and (((Percentage life of (Matching unit)) Greater than or equal to 75.00) and ((Percentage mana of (Matchi
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Real((Number of units in RatGroup))) Greater than or equal to 1.00
- (Real((Level of 444Helmets for Warehouse 0330 <gen>))) Greater than or equal to 2.00
- (Real((Level of 444Shields for Warehouse 0330 <gen>))) Greater than or equal to 2.00
- (Real((Level of 444Swords for Warehouse 0330 <gen>))) Greater than or equal to 2.00
- (Real((Level of 444Metal Plates for Warehouse 0330 <gen>))) Greater than or equal to 6.00
-
Then - Actions
- Unit - Remove (Random unit from RatGroup) from the game
- Unit - Set level of 444Helmets for Warehouse 0330 <gen> to ((Integer((Real((Level of 444Helmets for Warehouse 0330 <gen>))))) - 1)
- Unit - Set level of 444Shields for Warehouse 0330 <gen> to ((Integer((Real((Level of 444Shields for Warehouse 0330 <gen>))))) - 1)
- Unit - Set level of 444Swords for Warehouse 0330 <gen> to ((Integer((Real((Level of 444Swords for Warehouse 0330 <gen>))))) - 1)
- Unit - Set level of 444Metal Plates for Warehouse 0330 <gen> to ((Integer((Real((Level of 444Metal Plates for Warehouse 0330 <gen>))))) - 5)
-
Else - Actions
- Custom script: call IssueImmediateOrderById(GetTriggerUnit(), 851976)
- Set tempforce = (Player group((Owner of Barracks 0200 <gen>)))
- Game - Display to tempforce the text: Insufficient resour...
- Custom script: call DestroyForce(udg_tempforce)
-
If - Conditions
- Custom script: call DestroyGroup (udg_RatGroup)
-
Events
Everything works perfectly except one thing...the trigger doesn't make any difference between units that are about to be trained.(Footman, Archer, etc.=all are the same=bad)
So, I need a way to detect that unit's type
I also found something (hail google) that might work, but I have no idea how to use it
[triggger]Custom script: GetTrainedUnitType()
[/trigger]
Last edited: