• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Need some help with a triggah

Status
Not open for further replies.
Level 15
Joined
Jan 16, 2008
Messages
1,244
Here it goes:
edit: i did not set any condition to filter units replaced, that part is up to you.
 

Attachments

  • Replace units.JPG
    Replace units.JPG
    16.5 KB · Views: 73
Level 15
Joined
Jan 27, 2007
Messages
948
but theres a lot of units :/, lets make an example:

I have Red house level 1
and i create 2 peons from Red house lvl 1
then i upgrade the house and i get Red house level 2
and i create 2 peons lvl 2 from red house lvl 2
and then i upgrade red house lvl 2 to 3
and i create 3 peons lvl 3
then i use the abilite, this should take them all to lvl 3 (respective to the red houselvl, if it is lvl 2 it should take em all to lvl 2)
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Events
    • Unit - A unit finishes an upgrade (or something similar)
  • Conditions
    • (Unit-type of (Triggering Unit)) equal to *your new upgraded building*
  • Actions
    • Set Level_upgrade[Player Number of (Owner of (Triggering Unit))] = (Level_upgrade[Player Number of (Owner of (Triggering Unit))] + 1)
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • Ability being cast equal to *your ability*
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • 'IF'-Conditions
        • Level_upgrade[Player Number of (Owner of (Triggering Unit))] equal to 2
      • 'THEN'-Actions
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick every unit owned by (Owner of (Triggering Unit)) of type *your lv 1 unit* and do Unit - Replace (Picked Unit) with a *Your Lv2 Unit* using new unit life/mana
      • 'ELSE'-Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • 'IF'-Conditions
            • Level_upgrade[Player Number of (Owner of (Triggering Unit))] equal to 2
          • 'THEN'-Actions
            • Custom script: set bj_wantDestroyGroup = true
            • Unit Group - Pick every unit owned by (Owner of (Triggering Unit)) of type *your lv 2 unit* and do Unit - Replace (Picked Unit) with a *Your Lv 3 Unit* using new unit life/mana
          • 'ELSE'-Actions
            • ...
and so on.. whoo another mystery solved
 
Status
Not open for further replies.
Top