• 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.

[Solved] Unit Upgrade Help

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243
You can make them available/unavailable with triggers:
  • Untitled Trigger 029
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Make Footman Unavailable for training/construction by (Picked player)
  • Untitled Trigger 031
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Berserker Upgrade
    • Actions
      • Player - Make Footman Available for training/construction by (Triggering player)
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Custom script: set bj_wantDestroyGroup = true
Unit group - pick all units in playbale map area matching (matching unit) is alive and owner (matching unit) equal to triggering player and unit type of (matching unit) equal to *your unit type*
loop
->replace (picked unit) with *new unit type*

Do that in the "finishes research" trigger.
 
Level 4
Joined
Dec 2, 2011
Messages
76
  • Zergling upgrade.
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
    • (Researched tech-type) Equal to Zergling Upgrade
      • Actions
        • Player - Make Mutant Dog Unavailable for training/construction by (Triggering player)
  • Player - Make Zergling Available for training/construction by (Triggering player)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) Equal to (Triggering player)) and ((Unit-type of (Matching unit)) Equal to Mutant Dog)))) and do (Actions)
    • Loop - Actions
      • Unit - Replace (Picked unit) with a Zergling using The new unit's default life and mana
I made the research trigger but nothing happens to my existing mutant dogs.
It makes the mutant dog unavailable and the zergling available but it doesn't do what is stated above.
Why is this?
 
Status
Not open for further replies.
Top