• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Replacing makes unit be spawned again idk

Status
Not open for further replies.
Level 27
Joined
Dec 3, 2018
Messages
897
  • ExtendDefInfo
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Remove ExtDefUInfo[1] from the game
      • Unit - Remove ExtDefUInfo[2] from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ExtDefUInfo[1] Equal to No unit
        • Then - Actions
          • Unit - Create 1 Starter for Player 9 (Gray) at (Center of Region 075 <gen>) facing Default building facing degrees
          • Set VariableSet ExtDefUInfo[1] = (Last created unit)
          • Unit - Replace ExtDefUInfo[1] with a ExtDefUT[1] using The old unit's relative life and mana
          • Set VariableSet ExtDefUInfo[1] = (Last replaced unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last replaced unit)
          • Unit - Set Max HP of ExtDefUInfo[1] to ExtDefI[1]
          • Animation - Change ExtDefUInfo[1]'s vertex coloring to (0.00%, 80.00%, 100.00%) with 40.00% transparency
        • Else - Actions
          • Unit - Replace ExtDefUInfo[1] with a ExtDefUT[1] using The old unit's relative life and mana
          • Set VariableSet ExtDefUInfo[1] = (Last replaced unit)
          • Unit - Set Max HP of ExtDefUInfo[1] to ExtDefI[1]
          • Animation - Change ExtDefUInfo[1]'s vertex coloring to (0.00%, 80.00%, 100.00%) with 40.00% transparency
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ExtDefUInfo[2] Equal to No unit
        • Then - Actions
          • Unit - Create 1 Starter for Player 10 (Light Blue) at (Center of Region 076 <gen>) facing Default building facing degrees
          • Set VariableSet ExtDefUInfo[2] = (Last created unit)
          • Unit - Replace ExtDefUInfo[2] with a ExtDefUT[2] using The old unit's relative life and mana
          • Set VariableSet ExtDefUInfo[1] = (Last replaced unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last replaced unit)
          • Unit - Set Max HP of (Triggering unit) to ExtDefI[2]
          • Unit - Set Max HP of ExtDefUInfo[1] to ExtDefI[1]
          • Animation - Change ExtDefUInfo[1]'s vertex coloring to (0.00%, 80.00%, 100.00%) with 40.00% transparency
        • Else - Actions
          • Unit - Replace ExtDefUInfo[2] with a ExtDefUT[2] using The old unit's relative life and mana
          • Set VariableSet ExtDefUInfo[1] = (Last replaced unit)
          • Unit - Set Max HP of (Triggering unit) to ExtDefI[2]
          • Unit - Set Max HP of ExtDefUInfo[1] to ExtDefI[1]
          • Animation - Change ExtDefUInfo[1]'s vertex coloring to (0.00%, 80.00%, 100.00%) with 40.00% transparency
Ignore the expiration timer.
Considering that periodically ExDefUT 1 and 2 are being changed, this trigger should spawn only 1 unit and change it every 2s. Sadly, it keeps spawning units every 2 seconds. How do I fix this?
 

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,961
What exactly are you trying to achieve here? It's a bit confusing to me.

If you always Remove ExtDefUInfo 1 and 2 then check if they're equal to No Unit afterwards isn't that check redundant? You know they have just been Removed from the game. Also, how are you going to Replace a Removed unit? It's been removed. As far as I know you can't interact with a Removed unit at all just like how you couldn't reference a Point that's been destroyed.
 
Last edited:
Status
Not open for further replies.
Top