Root/uproot detection

Faust

You can change this now in User CP.
Reaction score
123
I need to detect when a unit uses root/uproot.

"A unit is ordered to" is no good, naturally.

"Starts the effect of an ability" doesn't fire.

Suggestions?
 

Faust

You can change this now in User CP.
Reaction score
123
It fires when the order is given, not when the ability is used?
 

Builder Bob

Live free or don't
Reaction score
249
It fires when the order is given, not when the ability is used?

Right, so it can only accurately determine when you uproot, while not when you root.

I did a quick check to figure out which events fired on both root and uproot. Strange as it might seem, unit selected event fired on both root and uproot. No other event fired on rooting. You can continue doing tests on it if you want. Maybe you can come up with a sure way to detect a root/uproot event.
 

Faust

You can change this now in User CP.
Reaction score
123
>>Unit selected event

What? How can an event that fires when I select unit fire when I use an ability?
 

Builder Bob

Live free or don't
Reaction score
249
>>Unit selected event

What? How can an event that fires when I select unit fire when I use an ability?

Not everything happening in Warcraft 3 is all that logical. That's why I asked about what "A unit is ordered to" did in this case as well.

Anyway, a "unit selected event" fires when the unit roots. Unfortunately, it seems you select the unit you currently have selected when a unit roots, so GetTriggerUnit() will not be the unit rooting. How it can be exploited I don't really know.
 

Faust

You can change this now in User CP.
Reaction score
123
Unfortunately that does not suffice. Thank you anyway. I'll try to periodically check the given order's target coordinates and put the actions when the unit reaches the point.

If anyone has a better idea, shoot away :p
 

Bloodcount

Starcraft II Moderator
Reaction score
297
a unit begins the effect of an ability ?!

EDIT: Wut? It doesn't work? well, what about: Make a triggered ability based on roar. Then with triggers when the unit casts this ability unroot/root and so on.
 

PrisonLove

Hard Realist
Reaction score
78
>>Unit selected event

What? How can an event that fires when I select unit fire when I use an ability?

I think it would work because, when you root you're technically morphing the unit; therefore, every time you fire the event you're selecting a new unit, thus the trigger would kind of work. There are obvious flaws, however.
 

mathiashl

New Member
Reaction score
0
maybe the above method would work else try this

Event - unit starts the effect of an ability
condition - none
action - wait for condition checking every 0.01 sec. of the game(triggering unit is uprooted)
im not sure you can do this:eek:
 

Azylaminaz

Vox Populi
Reaction score
91
Unit - A unit Is issued an order with no target
Works for when the unit uproots.

Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Wait until (((Triggering unit) is A structure) Equal to True), checking every 1.00 seconds
That wouldn't work for rooting? o_O Of course, it wouldn't be that simple considering if they cancel... Perhaps:
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Wait until ((((Triggering unit) is A structure) Equal to True) or ((Current order of (Triggering unit)) Not equal to (Order(root)))), checking every 1.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A structure) Equal to True
        • Then - Actions
          • <Actions>
        • Else - Actions
 

Faust

You can change this now in User CP.
Reaction score
123
No it wouldn't work for that :p But don't worry I got an idea since then and trying to create a system for it. Still having minor problems though.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top