• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] Unit Upgrade Help

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,240
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,240
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 37
Joined
Mar 6, 2006
Messages
9,240
New Action -> Unit group -> Pick every unit in group and do multiple actions
Choose "units in region matcghing condition".
When you click the red underlined condition, choose "and" from the drop-down menu.
For condition 1, use the unit is alive condition. For condition 2, select "and" and setup the to remaining conditions.
 
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