• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Adding ability when unit is standing still

Status
Not open for further replies.
Uuuh hard -.-

you need to trigger this I think (there might be a solution with the nightelf invisble thing but i don't know how to do that...)


I would do it like this:

Variables: Position = Position. XD

Event: Time - Every 0.2 sec of gametime
Action:
If(Position of "YourUnit" == "Position")
Then: Add "yourAbility" to "YourUnit"
Else: Remove "yourAbility" from "yourUnit"

Set Position = Position of "YourUnit"
 
Uuuh hard -.-

you need to trigger this I think (there might be a solution with the nightelf invisble thing but i don't know how to do that...)


I would do it like this:

Variables: Position = Position. XD

Event: Time - Every 0.2 sec of gametime
Action:
If(Position of "YourUnit" == "Position")
Then: Add "yourAbility" to "YourUnit"
Else: Remove "yourAbility" from "yourUnit"

Set Position = Position of "YourUnit"

Thanks for your answear. I can also add that the ability I need this for is "Recieve gathered resources." When the unit stands still, lumber can be recieved to the unit, but when the unit moves, workers can NOT leave their lumber to it.
 
I would do it like this:

Variables: Position = Position. XD

Event: Time - Every 0.2 sec of gametime
Action:
If(Position of "YourUnit" == "Position")
Then: Add "yourAbility" to "YourUnit"
Else: Remove "yourAbility" from "yourUnit"

Set Position = Position of "YourUnit"

What type of variable is the variable?
 
Actually have this:

  • Move1
  • Events
    • Time - Every 0.06 seconds of game-time
  • Conditions
  • Actions
    • Set Point1 = (Position of (Your unit))
  • Move2
  • Events
    • Time - Every 0.08 seconds of game-time
  • Conditions
  • Actions
    • Set Point2 = (Position of (Your unit))
    • If/ Then/ Else
      • If (Conditions)
        • (Distance between Point2 and Point1) Equal to 0
      • Then (Actions)
        • Unit - Add Ability to (Your unit)
      • Else (Actions)
        • Unit - Remove Ability from (Your unit)
    • Custom script: call RemoveLocation (udg_Point2)
    • Custom script: call RemoveLocation (udg_Point1)
 
Thanks for your trigger! When the unit stands still, I want the ability to be added to the unit after the unit have been still for a couple of seconds. Can I do that by changing the Event - Time to for example 5 seconds?
 
Status
Not open for further replies.
Back
Top