• 🏆 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!

Re-Add Last Replaced Unit back to Selection

Status
Not open for further replies.
Level 12
Joined
May 20, 2009
Messages
822
Edit: I figured out the problem. (Hopefully.) Oh well, at least I can bump this and hopefully get an answer for my other problem. xD




One other Issue as well.

As it turns out, a unit that is currently being trained will NOT be replaced after the upgrade finishes once it finishes training.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Well then, take this situation as an example;
1. A Footman is trained from the Barracks
2. There is an upgrade at that Barracks, Upgrades your Footman into Knights
3. When you have finished that upgrade...

  • Untitled Trigger 002
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to KnightsUpgrade
    • Actions
      • Set ResearchBoolean[(Player number of (Triggering player))] = True
This will set a Boolean (array) for that Player, so that the game can "recognize" that player has went through that research/upgrade

4. You should do this next;
  • Untitled Trigger 002
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
      • ResearchBoolean[(Player number of (Triggering player))] Equal to True
    • Actions
      • Unit - Replace (Triggering unit) with a Knight using The old unit's relative life and mana
This will assure you that if you have already research the upgrade, it will replace newly trained units (namely Footman) to a Knight.
 
Status
Not open for further replies.
Top