• 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] Custom spells condition.

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
I have a custom hero with custom abilites (all missile spells) I want the hero to only be able to cast all of his abilites when he uses his innate ability (farsee<reveal>) Ive ran into problems with the trigger.
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Unit-type of (casting unit)) equal to Planewalker
  • Actions
    • ------- Stuck -------
I'm having troubles thinking of how to do this. Perhaps i'm going about this the wrong way, i dunno. I was thinking of maybe setting it to an integer var. But then i would have problems due to the fact that the hero could cast his abilites anywhere in the map. Not just in the given area of his innate ability. Any help?
 
Level 17
Joined
Jun 28, 2008
Messages
776
If I am not mistaken on what you want, then this should work :

  • Abilities Innate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Innate Ability
    • Actions
      • Set Boolean_Innate[(Player number of (Owner of (Casting unit)))] = True
and then

  • Normal Cast 1
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Unit-type of (Casting unit)) Equal to Your Unit Type
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Boolean_Innate[(Player number of (Owner of (Casting unit)))] Equal to True
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Unit - Order (Casting unit) to Stop
          • Set Boolean_Innate[(Player number of (Owner of (Casting unit)))] = False
This only allows a unit to cast an ability when he has casted the innate ability.

Hope it helps.
 
Level 9
Joined
Jun 7, 2008
Messages
440
Just to reiterate. I don't want his ability to be able to cast anywhere on the map (though his casting range is maxed) Once he casts his innate reveal ability, i want his spells to only be able to be cast in the area he revealed.
 
Level 11
Joined
May 31, 2008
Messages
698
Put it at the target of ability cast. The ability being reveal. And for the distance say that the distance between two points (caster and dummy) is less than or equal to whatever you want ur distance to be. Give the dummy an expiration timer for hower long you want your hero to be able to cast abilities in that area. Remember to update the position of the caster every time it casts an ability. You shud use a point variable, not position of unit, so it doesnt leak. Hope this helped.
 
Status
Not open for further replies.
Top