• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

Check upgrade

Status
Not open for further replies.
Level 19
Joined
Oct 7, 2014
Messages
2,211
I need help for a trigger.
I made an ability when the unit dies with be replaced by another unit but I need to check if the upgrade is finished because the ability must be research first before the ability to occur.

  • Shadow Ascend
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
    • Actions
      • Trigger - Turn on Shadow Ascend Execute <gen>
  • Shadow Ascend Execute
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Deciever
    • Actions
      • Set DyingUnit = (Dying unit)
      • Set DyingUnit_Position = (Position of DyingUnit)
      • Set DyingUnit_Owner = (Owner of DyingUnit)
      • Unit - Create 1 Shadow for DyingUnit_Owner at DyingUnit_Position facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_DyingUnit_Position)
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
I think you need to make a boolean array for each player.
When a certain player finishes the upgrade, set the boolean with player number as index to TRUE.
Then put a condition inShadow Ascend Execute that if that boolean is true, run the code.

EDIT: something like this
shadowAscendUpgraded is false initially

  • Shadow Ascend
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
    • Actions
      • Set shadowAscendUpgraded[Player Number of Owner of Triggering Unit)] = true
  • Shadow Ascend Execute
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Deciever
      • shadowUpgraded[Player number of Owner of Triggering Unit)] Equal to True
    • Actions
      • Set DyingUnit = (Dying unit)
      • Set DyingUnit_Position = (Position of DyingUnit)
      • Set DyingUnit_Owner = (Owner of DyingUnit)
      • Unit - Create 1 Shadow for DyingUnit_Owner at DyingUnit_Position facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_DyingUnit_Position)
Sorry Im using my phone so it is a struggle to type
 
Status
Not open for further replies.
Top