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

[Spell] Odd bug?

Status
Not open for further replies.
Level 7
Joined
Nov 18, 2012
Messages
272
Hi.

I tried to make a spell that prevents casting Robo-Goblin. It works and all, but the icon still changes if I do...

So the guy doesn't morph at all, but the icon/tooltip still changes. The spell works just fine afterwards.
 
Level 7
Joined
Nov 18, 2012
Messages
272
  • Take Flight
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Tly
    • Actions
      • Set Fl_Unit = (Casting unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of Fl_Unit) Equal to Peasant
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Fl_Unit has buff Increased) Equal to True
            • Then - Actions
              • Unit - Order Fl_Unit to Stop
            • Else - Actions
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Why are you checking the unit type of the casting unit? You don't need to check the type because the one casting the Robo-goblin already has the ability.

Also, change Casting Unit to Triggering Unit.
Also, change the event to 'Starts the effect of an ability'

I think a solution would be removing the ability from the unit when the ability is cast.

  • Take Flight
    • Events
    • Unit - A unit starts the effect of an ability
    • Conditions
    • (Ability being cast) Equal to Tly
    • Actions
    • Set Fl_Unit = (Triggering Unit)
    • Unit - Remove Tly from Fl_Unit
If you want to add the ability just do so using the same action, Unit - Add Ability to Unit.
I'm not sure of this yet.
 
Status
Not open for further replies.
Top