• 🏆 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!

[Trigger] Range of skill condition

Status
Not open for further replies.
Level 1
Joined
Jun 5, 2008
Messages
151
Hi i need help with an condition...I need condition for range of my skill. This skill is a buff so when i have buff activated i can use this skill on target but range of my attack is max...i want to change it for like 1000. so i am looking for condition which i can add to trigger and if condition is false then he wont use skill.

Conditions:

spell 001 range is equal or less than 1000 equal to YES


so if target will be farther than 1000 then hero will just move to him and when reach 1000range then it will use spell ;) well i hope you understand thanks
 
Level 1
Joined
Jun 5, 2008
Messages
151
  • Test
  • Conditions
    • (Distance between (Position of (Triggering unit)) and (Target point of ability being cast)) Greater than or equal to 1000.00
This should do the trick.

ok thanks ;) i will check if its working and let you know.
 
Last edited:
Level 1
Joined
Jun 5, 2008
Messages
151
I will put that triggers here so maybe you will know how to do it ;)


  • Chidori Initialization
    • Events
      • Unit - a unit is starting to cast a spell
    • Conditions
      • (Ability being cast) is equal to Chidori
    • Actions
      • Set Chidori_Caster[(Player number of (Owner of (Triggering unit)))] = (Casting unit)
      • Trigger - Turn on Chidori <gen>

  • Events
    • jednostka - A unit is order with chosing target
  • Conditions
    • And - All (Conditions) are true
      • Conditions
        • ((Ordered unit) has buff Chidori ) is equal to YES
        • ((Target unit of issued order) belongs to an enemy of (Owner of Chidori_Caster[(Player number of (Owner of (Triggering unit)))])) is equal to YES
        • ((Item-type of (Target item of issued order)) is Reinforcement) is equal to NO
        • ((Item-type of (Target item of issued order)) is Can be sold) is equal to NO
        • ((Item-type of (Target item of issued order)) is can be grouped) is equal to NO
  • Actions
    • Set Chidori_Caster[(Player number of (Owner of (Triggering unit)))] = (Ordered unit)
    • Set Chidori_Target[(Player number of (Owner of (Triggering unit)))] = (Target unit of issued order)
    • Set Chidori_CastLoc[(Player number of (Owner of (Triggering unit)))] = (Position of Chidori_Caster[(Player number of (Owner of (Triggering unit)))])
    • Set Chidori_TargLoc[(Player number of (Owner of (Triggering unit)))] = (Position of Chidori_Target[(Player number of (Owner of (Triggering unit)))])
    • Unit - Make Chidori_Caster[(Player number of (Owner of (Triggering unit)))] face Chidori_Target[(Player number of (Owner of (Triggering unit)))] over 0.00 seconds
    • Unit - pause Chidori_Caster[(Player number of (Owner of (Triggering unit)))]
    • Wait 0.50 seconds
    • Special Effect - Create a special effect at Chidori_CastLoc[(Player number of (Owner of (Triggering unit)))] using Abilities\Weapons\Bolt\BoltImpact.mdl
    • Custom script: call RemoveLocation (udg_Chidori_CastLoc[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
    • Special Effect - Destroy (Last created special effect)
    • Animation - Play Chidori_Caster[(Player number of (Owner of (Triggering unit)))]'s attack animation
    • Unit - Turn off pause Chidori_Caster[(Player number of (Owner of (Triggering unit)))]
    • Unit - Turn collision for Chidori_Caster[(Player number of (Owner of (Triggering unit)))] WyĹ‚.
    • Animation - Change Chidori_Caster[(Player number of (Owner of (Triggering unit)))]'s animation speed to 75.00% of its original speed
    • Unit - Make Chidori_Caster[(Player number of (Owner of (Triggering unit)))] indestructible
    • Trigger - Turn on Chidori Move <gen>
    • Trigger - Turn on Chidori Move Effect <gen>
  • Chidori Move
    • Events
      • time - Every 0.01 seconds of game time
    • conditions
    • actions
      • Set Chidori_CastLoc[(Player number of (Owner of (Triggering unit)))] = (Position of Chidori_Caster[(Player number of (Owner of (Triggering unit)))])
      • unit - Make Chidori_Caster[(Player number of (Owner of (Triggering unit)))] face Chidori_Target[(Player number of (Owner of (Triggering unit)))] over 0.00 seconds
      • unit - Move Chidori_Caster[(Player number of (Owner of (Triggering unit)))] instantly to (Chidori_CastLoc[(Player number of (Owner of (Triggering unit)))] offset by 20.00 towards (Facing of Chidori_Caster[(Player number of (Owner of (Triggering unit)))]) degrees)
      • Custom script: set bj_wantDestroyGroup = true
      • unit group - Pick every unit in (Units within 95.00 of (Position of Chidori_Caster[(Player number of (Owner of (Triggering unit)))])) and do (Actions)
        • Loop - actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - conditions
              • (Picked unit) equal to Chidori_Target[(Player number of (Owner of (Triggering unit)))]
            • then - actions
              • special effect - Create a special effect at Chidori_CastLoc[(Player number of (Owner of (Triggering unit)))] using Abilities\Weapons\Bolt\BoltImpact.mdl
              • special effect - Destroy (Last created special effect)
              • unit - Remove Chidori buff from Chidori_Caster[(Player number of (Owner of (Triggering unit)))]
              • unit - Turn collision for Chidori_Caster[(Player number of (Owner of (Triggering unit)))] ON.
              • Animation - Change Chidori_Caster[(Player number of (Owner of (Triggering unit)))]'s animation speed to 100.00% of its original speed
              • animation - Play Chidori_Caster[(Player number of (Owner of (Triggering unit)))]'s attack animation
              • unit - Make Chidori_Caster[(Player number of (Owner of (Triggering unit)))] destructable
              • unit - Cause Chidori_Caster[(Player number of (Owner of (Triggering unit)))] to damage Chidori_Target[(Player number of (Owner of (Triggering unit)))], dealing ((Real((Level of Chidori for Chidori_Caster[(Player number of (Owner of (Triggering unit)))]))) x (3.00 x (Real((agililty of Chidori_Caster[(Player number of (Owner of (Triggering unit)))] (add bonuses)))))) damage of attack type spell and damage type Electric
              • trigger - Turn off Chidori Move Effect <gen>
              • trigger - Turn off Chidori Move <gen>
            • else - actions
      • Custom script: call RemoveLocation (udg_Chidori_CastLoc[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
  • Chidori Move Effect
    • events
      • time - Every 0.03 seconds of game time
    • conditions
    • Actions
      • Set Chidori_CastLoc[(Player number of (Owner of (Triggering unit)))] = (Position of Chidori_Caster[(Player number of (Owner of (Triggering unit)))])
      • Efekt specjalny - Create a special effect at Chidori_CastLoc[(Player number of (Owner of (Triggering unit)))] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • special effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation (udg_Chidori_CastLoc[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
so is there someone who can help me? lol
 
Last edited:
Level 1
Joined
Jun 5, 2008
Messages
151
I put here triggers for a spell ;) i want to add somewhere a condition which will check range...because actually after i use skill and right click on monster which is on other side of the map..he will attack him :) i want to make condition which will change range of skill to 1000 and less
 
Level 1
Joined
Jun 5, 2008
Messages
151
because this ability is a buff ;) i will explain how it works.

You use ability and you get a buff as long as this buff is active you can right-click on target enemy and skill will be used. even if enemy far away...i tried changing range in skill before and it didnt work ;) when he use a skill he dash to enemy very fast xD
 
Level 11
Joined
Sep 30, 2009
Messages
697
first no double posting. about your spell use this event and the conditions:
  • Trigger
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(smart))
      • ((Triggering unit) Equal to Caster) and (((Triggering unit) has buff Buff) Equal to True)
    • Actions
For this you need the caster of the buff and the buffs id.
 
Level 1
Joined
Jun 5, 2008
Messages
151
ok thanks i will check it

@EDIT:

hmm but you forget about something -.- i need condition which will check range of target...i mean range of spell must be equal to 1000 or less...
 
Last edited:
Level 1
Joined
Jun 5, 2008
Messages
151
i see that i have to do DOuble post...cuz no one will reply if i wont do that...fread me previous post
 
Status
Not open for further replies.
Top