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

Disable Parasite Autocast

Status
Not open for further replies.
Level 8
Joined
Aug 8, 2008
Messages
340
So I've been trying to disable the autocast function of my custom ability based on Parasite. This is what I've got so far:
  • Unit - A unit Is issued an order with no target
  • (Issued order) Equal to (Order(parasiteon))
  • Custom script: call IssueImmediateOrder (GetTriggerUnit(), "parasiteoff"
Can someone please explain to me, why this ain't working?
 
Level 8
Joined
Aug 8, 2008
Messages
340
I have tried to add the wait action, which for some strange reason made it work.
But the fact that the player is able to right click the spell (showing a glimpse of the auto-cast glow) annoys me. If I where to make an ability based on channel with a dummy unit how, as LordDz suggested, how would I do it? I've never made dummy based abilities before, but always wanted to learn it. Can someone show me an example of how to do this particular parasite spell?
 
Level 12
Joined
May 20, 2009
Messages
822
I'd say LordDz's method, except don't use Channel, as it stops the unit from receiving orders for the duration of the channel.

Use say...Holy light instead, make the heal/damage amount 0, change graphics around, make a new buff, do:

  • FSnare Calc
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff YOUR_BUFF ) Equal to True
            • Then - Actions
              • Unit - Create 1 DUMMY_CASTER_UNIT for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
                • Unit - Order (Last created unit) to Naga Siren - Parasite (Picked unit)
                • Unit - Remove (Last created unit) from the game
              • Else - Actions
Adding the Parasite Spell (Or your own custom Parasite spell so you can have a different unit spawned) to the Dummy unit.

Unit - Order (Last created unit) to Naga Siren - Parasite (Picked unit) Will work for ANY spell so long as the Order String - Use/Turn On is "parasite" and as long as that spell ACTUALLY uses the Order String - Use/Turn On. Some do not use it, and will not actually issue that order if you put it there.

To clearify: The spell that has the "parasite" order is for the DUMMY unit and not for the unit casting the spell that puts the buff on the unit.

Also, make sure the Dummy Unit's Animation - Cast Backswing and Animation - Cast Point are 0.
 
Level 8
Joined
Aug 8, 2008
Messages
340
Thanks alot for the feedback. I know better understand how dummy units work.
This thread also made me realize, that I could simply base this off Shadow Strike and have a trigger look for the buff on dying units, which in that case it will spawn a unit.
 
Level 25
Joined
May 11, 2007
Messages
4,650
I'd say LordDz's method, except don't use Channel, as it stops the unit from receiving orders for the duration of the channel.
What? Channel works like the spell you make it to? So Channel can work like a point ability, targeting ability, no targeting ability, channeling ability..? :)

And holy light doesn't work against specific units.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Can someone please explain to me, why this ain't working?
Custom script: call IssueImmediateOrder (GetTriggerUnit(), "parasiteoff"
This is not legal JASS. It will throw a syntax error and cause the trigger to be disabled when saving.

You need to close the brackets.
  • Custom script: call IssueImmediateOrder (GetTriggerUnit(), "parasiteoff")
Next to that save time error that prevents the trigger from working, you also have a logical error. The event runs the trigger before the order is issued so you interrupt it with another order that makes no sense. Basically you cannot turn parasite off if it has not been turned on yet.

The solution is to simply use a 0 second timer to delay the turn off until after the turn on happens but with so little delay it might as well have never been turned on (likely sub-frame).
 
Level 12
Joined
May 20, 2009
Messages
822
Thanks alot for the feedback. I know better understand how dummy units work.
This thread also made me realize, that I could simply base this off Shadow Strike and have a trigger look for the buff on dying units, which in that case it will spawn a unit.

Shadow Strike is your best friend when making spells. =)
(Sometimes I forget that myself...)
 
Status
Not open for further replies.
Top