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

Ward Ability looking for help

Status
Not open for further replies.
Level 5
Joined
Aug 8, 2008
Messages
113
+rep for all the people whos been helping me thus far also credits in the readme

Hmm i forget to destroy the point variable any way.....Im looking for the reason why the temp unit isn't created.


  • Setup
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Triggering unit) has buff Small ) Equal to True
              • ((Triggering unit) has buff Big ) Equal to True
              • (Unit-type of (Summoned unit)) Equal to Sentry Ward lvl 1
        • Then - Actions
          • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds
          • Set Point = (Position of (Triggering unit))
          • Unit - Create 1 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing (Position of (Triggering unit))
          • Set TempU = (Last created unit)
          • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds
          • Unit - Add a 230.00 second Generic expiration timer to TempUnit
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Triggering unit) has buff Small ) Equal to True
                  • ((Triggering unit) has buff Big ) Equal to True
                  • (Unit-type of (Summoned unit)) Equal to Sentry Ward lvl 2
            • Then - Actions
              • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds
              • Set Point = (Position of (Triggering unit))
              • Unit - Create 2 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing (Position of (Triggering unit))
              • Set TempU = (Last created unit)
              • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds
              • Unit - Add a 270.00 second Generic expiration timer to TempUnit
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • ((Triggering unit) has buff Small ) Equal to True
                      • ((Triggering unit) has buff Big ) Equal to True
                      • (Unit-type of (Summoned unit)) Equal to Sentry Ward lvl 3
                • Then - Actions
                  • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds
                  • Set Point = (Position of (Triggering unit))
                  • Unit - Create 3 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing (Position of (Triggering unit))
                  • Set TempU = (Last created unit)
                  • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds
                  • Unit - Add a 320.00 second Generic expiration timer to TempUnit
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • ((Triggering unit) has buff Small ) Equal to True
                          • ((Triggering unit) has buff Big ) Equal to True
                          • (Unit-type of (Summoned unit)) Equal to Sentry Ward lvl 4
                    • Then - Actions
                      • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds
                      • Set Point = (Position of (Triggering unit))
                      • Unit - Create 4 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing (Position of (Triggering unit))
                      • Set TempU = (Last created unit)
                      • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds
                      • Unit - Add a 360.00 second Generic expiration timer to TempUnit
                    • Else - Actions
 
Level 9
Joined
May 21, 2014
Messages
580
In your given conditions, I would try setting the event

"Unit - Spawns a Unit"

Then change the conditionals from "Triggering Unit" to "Summoning Unit".
I think the "Unit Type of (Summoned Unit) can't be detected because you needed the event I provided for it to be detected.
 
Level 5
Joined
Aug 8, 2008
Messages
113
In your given conditions, I would try setting the event

"Unit - Spawns a Unit"

Then change the conditionals from "Triggering Unit" to "Summoning Unit".
I think the "Unit Type of (Summoned Unit) can't be detected because you needed the event I provided for it to be detected.



I never explain how its suppose to work....Its suppose to work as a ward that spawns a unit with the locust ability when an enemy walks near it and after traveling to far from the ward the unit dies. I had to use some work arounds to get it to work though. but i will try what you said.
 
Level 12
Joined
Nov 3, 2013
Messages
989
The triggering unit is lost after the first wait.

Try to set a unit variable before the wait.
Set Temp_Unit_Var = Triggering unit
And then refer to Temp_Unit_Var instead of triggering unit in the following actions.

Just notice that if more than one unit can use this ability it will get messed up.

Could 'shadow' (or what it's called) the global var and use it in a custom script to call the local to allow MUI.
 
Level 5
Joined
Aug 8, 2008
Messages
113
Could 'shadow' (or what it's called) the global var and use it in a custom script to call the local to allow MUI.

totally confused by this entire statement


----- what i have so far -------
  • Setup
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
    • Actions
      • Set SpawnedUnit = (Summoned unit)
      • Trigger - Add to Setup <gen> the event (Unit - A unit comes within 256.00 of SpawnedUnit)
      • Set Enemyunit = (Entering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Enemyunit has buff Small ) Equal to True
              • (Enemyunit has buff Big ) Equal to True
              • (Unit-type of SpawnedUnit) Equal to Sentry Ward lvl 1
        • Then - Actions
          • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds
          • Set Point = (Position of Enemyunit)
          • Unit - Create 1 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing Point
          • Set TempUnit = (Last created unit)
          • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds
          • Unit - Add a 230.00 second Generic expiration timer to TempUnit
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Enemyunit has buff Small ) Equal to True
                  • (Enemyunit has buff Big ) Equal to True
                  • (Unit-type of SpawnedUnit) Equal to Sentry Ward lvl 2
            • Then - Actions
              • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds
              • Set Point = (Position of Enemyunit)
              • Unit - Create 2 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing Point
              • Set TempUnit = (Last created unit)
              • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds
              • Unit - Add a 270.00 second Generic expiration timer to TempUnit
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • (Enemyunit has buff Small ) Equal to True
                      • (Enemyunit has buff Big ) Equal to True
                      • (Unit-type of SpawnedUnit) Equal to Sentry Ward lvl 3
                • Then - Actions
                  • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds
                  • Set Point = (Position of Enemyunit)
                  • Unit - Create 3 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing Point
                  • Set TempUnit = (Last created unit)
                  • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds
                  • Unit - Add a 320.00 second Generic expiration timer to TempUnit
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • (Enemyunit has buff Small ) Equal to True
                          • (Enemyunit has buff Big ) Equal to True
                          • (Unit-type of (Summoned unit)) Equal to Sentry Ward lvl 4
                    • Then - Actions
                      • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds
                      • Set Point = (Position of Enemyunit)
                      • Unit - Create 4 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing Point
                      • Set TempUnit = (Last created unit)
                      • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds
                      • Unit - Add a 360.00 second Generic expiration timer to TempUnit
                    • Else - Actions
 
Last edited:
Level 5
Joined
Aug 8, 2008
Messages
113
You create a global variable and use it to call for a local one instead through custom script, I just don't remember what it's called.

o ill look at the code and see if i can figure it out btw i updated my last post with what i have so far.... also i disablled the waits and it still doesnt work
 
Level 5
Joined
Aug 8, 2008
Messages
113

well the problem is that its not creating the wolf when a unit enters the area....... I tried what you said but its still a no go......


---------what I have so far----------
  • Setup
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
    • Actions
      • Custom script: local unit Summons = GetSummonedUnit()
      • Custom script: local unit Enemy
      • Set SpawnedUnit = (Summoned unit) (disabled)
      • Custom script: set udg_SpawnedUnit = Summons
      • Trigger - Add to Setup <gen> the event (Unit - A unit comes within 256.00 of SpawnedUnit)
      • Set Enemyunit = (Entering unit) (disabled)
      • Custom script: set Enemy = GetTriggerUnit()
      • Custom script: set udg_Enemyunit = Enemy
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Enemyunit has buff Small ) Equal to True
              • (Enemyunit has buff Big ) Equal to True
              • (Unit-type of SpawnedUnit) Equal to Sentry Ward lvl 1
        • Then - Actions
          • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds (disabled)
          • Set Point = (Position of Enemyunit)
          • Unit - Create 1 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing Point
          • Set TempUnit = (Last created unit)
          • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds (disabled)
          • Unit - Add a 230.00 second Generic expiration timer to TempUnit
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Enemyunit has buff Small ) Equal to True
                  • (Enemyunit has buff Big ) Equal to True
                  • (Unit-type of SpawnedUnit) Equal to Sentry Ward lvl 2
            • Then - Actions
              • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds (disabled)
              • Set Point = (Position of Enemyunit)
              • Unit - Create 2 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing Point
              • Set TempUnit = (Last created unit)
              • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds (disabled)
              • Unit - Add a 270.00 second Generic expiration timer to TempUnit
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • (Enemyunit has buff Small ) Equal to True
                      • (Enemyunit has buff Big ) Equal to True
                      • (Unit-type of SpawnedUnit) Equal to Sentry Ward lvl 3
                • Then - Actions
                  • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds (disabled)
                  • Set Point = (Position of Enemyunit)
                  • Unit - Create 3 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing Point
                  • Set TempUnit = (Last created unit)
                  • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds (disabled)
                  • Unit - Add a 320.00 second Generic expiration timer to TempUnit
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • (Enemyunit has buff Small ) Equal to True
                          • (Enemyunit has buff Big ) Equal to True
                          • (Unit-type of (Summoned unit)) Equal to Sentry Ward lvl 4
                    • Then - Actions
                      • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Greater than or equal to 2), checking every 0.10 seconds (disabled)
                      • Set Point = (Position of Enemyunit)
                      • Unit - Create 4 Shadow Wolf (Level 3) for Player 1 (Red) at Point facing Point
                      • Set TempUnit = (Last created unit)
                      • Wait until ((Number of All buffs considered Magic or physical on (Triggering unit) (Exclude expiration timers, Include auras)) Less than or equal to 1), checking every 0.10 seconds (disabled)
                      • Unit - Add a 360.00 second Generic expiration timer to TempUnit
                    • Else - Actions
 
Status
Not open for further replies.
Top