• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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