• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Ending windwalk

Status
Not open for further replies.
Level 2
Joined
Sep 3, 2006
Messages
14
I have a spell based around windwalk.

It is trigger edited, as I don't know JASS

A dummy follows the caster and casts banish on units nearby, basically.

However, when the caster breaks the spell (by attacking, casting a spell, etc) the effect continues.

I have made it so whenever he attacks, it will go away.

I was wondering if there was one simple way of ending the banishing effect as soon as the windwalk effect for any reason.

Does ending the windwalk effect count as "Finishing casting an ability" or "Stops casting an ability"? If not, are there any alternatives?
 
Level 4
Joined
Sep 20, 2005
Messages
72
well, a kinda dumb gui way of doing it would be to use two seperate triggers (probably 3 since im guessing u already have 2? one for spell trigger and one for timer + dummy banish casting?) and a global unit group. depending on how u did the dummy banish casting, u can add all those units u casted banish on into a unit group var.

the other trigger would fire when the unit has windwalk buff and is issued an order thats not move or stop or patrol (problematic with smart commands i think)

OR

another way of doing it may be just using a timer of maybe 0.2, checking whether the TriggeringUnit has buff windwalk. if not then remove banish buff from picked unit from the unit group, then turn trigger off. this trigger would be initially off and turned on when the spell trigger fires. ofc, not very MUI cuz of the global unit group =(

Hope that helps.
 
Level 2
Joined
Sep 3, 2006
Messages
14
Now time to be admit to being more of a complete noob.

How exactly do you check for the buff? I see buff comparison, but I figured you can't use that....

Is it trackable comparison?
 
Level 2
Joined
Sep 3, 2006
Messages
14
I think it would be easier to just show you my trigger:

EthOn
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Ethereal Walk [wind walk]
Actions
Set Excor = (Triggering unit)
Set EthOwner = (Owner of (Triggering unit))
Set EthOn = True
Set EthLevel = (Level of Ethereal Walk [wind walk] for (Triggering unit))
Wait 9.00 seconds
Set EthOn = False

EthEffects
Events
Time - Every 0.01 seconds of game time
Conditions
EthOn Equal to True
Actions
Set EthPoint = (Position of Excor)
Set EthGroup = (Units within 200.00 of EthPoint)
Unit Group - Remove Excor from EthGroup
Unit - Create 1 ExDummy for (Owner of Excor) at EthPoint facing EthPoint
Unit - Add Banish to (Last created unit)
Unit - Set level of Banish for (Last created unit) to EthLevel
Unit Group - Pick every unit in EthGroup and do (Actions)
Loop - Actions
Unit - Order (Last created unit) to Human Blood Mage - Banish (Picked unit)
Unit Group - Remove all units of EthGroup from EthGroup
Unit Group - Remove all units of EthOwnGroup from EthOwnGroup
Unit - Remove (Last created unit) from the game
Point - Remove EthPoint

I'm currently just finding a way to turn it off. Using the buff method would work I think, I just don't know how to do it.

Basically, any trigger that would turn EthOn to false when the ability's buff/effect is ended.
 
Level 4
Joined
Sep 20, 2005
Messages
72
a 0.01 periodic timer runs 100 times a sec. thats really more processing the pc is doing than whats necessary. plus the distance u move within 1/100 sec is neglible, not really gonna banish any new units in many runs of that trigger. 0.3 is many a plenty...
-also the same units r banished over n over again, which isnt necessary at all... use check buff before casting n it will reduce lag by a lot
-might also run into problem that nothing casts, cuz the unit is removed immediately after created (also has no time to cast spell)

bout checking buffs - explore boolean comparison. if anytime u look for some condition n its not where u think it is, do look in boolean. theres a lot of stuff in there that u wouldnt imagine it being there, but is actually most useful in many situations.
 
Level 2
Joined
Sep 3, 2006
Messages
14
Thanks so much, I got it to work now.

About MUI, I wouldn't know how to do it because I'm using globals, and without much experience in JASS it would probably be a failure.
 
Status
Not open for further replies.
Top