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

[Trigger] Detecting root/uproot

Status
Not open for further replies.
Level 3
Joined
Aug 19, 2005
Messages
47
Is here a way how to detec ct when the ancient roots and when it uproots? I treied all "* ability" events and none of them worked. The only way I know is detecting orders, but...it it really bad.

Thanks for replies
 
Level 3
Joined
Aug 19, 2005
Messages
47
The only way I know is detecting orders, but...it it really bad.

There is a problem, that this triggers when the unit is ordered to root somewhere, not when it really roots. The ancient may have to roun over one half of the map and the trigger would fire.
 
Level 6
Joined
Feb 25, 2005
Messages
230
Just_Spectating, have you tested it out? I think i tested it out, but it didnt work.

The unroot works with order, since it has no target.

You should ask in the JASS forum, maybe someone there can write a code for you.
 
Level 3
Joined
Aug 19, 2005
Messages
47
I know JASS, I just don't think there is something JASS can do better in this case. The unroot is ok, but root is still problem.

To Just_Spectating:
I treied all "* ability" events and none of them worked.

I also tried to check whether the unit is building or not (I thought the ancient is building only when rooted), but I realized it is building all the time.

Maybe you will manage to help me if I tell the purpose: I want to make the ancient regenerate itself on a very fast rate when rooted. That's all, sound very simple :(.
 
hmmm.. it doesnt have to be a building. you can make a unit look like the "tree of life" or w/e your unit looks like, and give it metamorphasis ability to change into a unit or even a building with 1000 regeneration or somthing and has no movement. This allows no triggering and may be a little helpful. Also it will cast right away rather than targeting a point. hope that helps a bit. i DID test this one this time and It works quite nicely
 
Last edited:
Level 34
Joined
Sep 6, 2006
Messages
8,873
Isn't there an action that detects when an ability is finished? So instead of using Issued and order or starts the effect, you could do a finishes root? Not sure about that though.
 
  • Root
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Issued order) Equal to (Order(root))
    • Actions
      • -------- Do what you want --------

that doesnt work, and Gilles, that doesnt work either. Ive already tested that way and it doesnt detect the root, also when the unit is issued, Right when its issued then it will do the action, rather then when it roots.
 
Level 34
Joined
Sep 6, 2006
Messages
8,873
Dragoon, he wants it to begin regenerating when it's actually rooted into the ground, not when you tell it to.
 
Level 18
Joined
May 27, 2007
Messages
1,689
ok use the "Unit-Is issued and order targeting a point" and then conditions "Issued Order Equal to Root" then go Set Root_Loc=Target point of issued order" then "Set Rooter_Loc=Ordered Unit" then go "Wait until Distance between Rooter_Loc and Root_Loc = to zero" then do whatever actions you need, and that should in theory detect when it is rooted or just about to, although i cant test it as i am not on my normal computer
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Detect the order like they've suggested, then use Wait for Condition to wait until the unit is at the correct area.

EDIT: Blarg, didn't notice famousskper's post

I know JASS, I just don't think there is something JASS can do better in this case.
Atleast it can't do anything worse =). And due to locals, yes it can do stuff better. (MUI the above suggestion)
 
Status
Not open for further replies.
Top