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

[Solved] Skill Cast Point

Status
Not open for further replies.
Level 9
Joined
Apr 7, 2010
Messages
480
most point target skills has :

1. The distance is fix, only the point will determine where the skill will travel to

(but i have mine travel exactly on the point, even without the projectile meeting the required distance)

but, if however

2. The target point is greater than the cast range then the hero would run into the nearest point wherein the distance of the hero and targeted point is equal to the cast range

the problem is that how would i prevent the hero from going near the targeted point. how can i change that into 1.) if 2.) is met.
 
I guess you could make a trigger like this, not sure if it will work though:
  • SkillCastPoint
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave
    • Actions
      • Set point[0] = (Position of (Casting unit))
      • Set point[1] = (Target point of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between point[0] and point[1]) Greater than or equal to 800.00
        • Then - Actions
          • Unit - Order (Casting unit) to Stop
        • Else - Actions
      • call RemoveLocation(udg_point[0])
      • call RemoveLocation(udg_point[1])
Change the number 800 in the If-Then-Else action to casting range of your ability, and change Shockwave in Conditions to your ability.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
So if the hero can't cast a spell where you point, you want it to not run but cast the spell where he stands?


  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Issued order) Equal to (Order(flamestrike))
    • Actions
      • Set p1 = (Position of (Triggering unit))
      • Set p2 = (Target point of issued order)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between p1 and p2) Greater than 800.00
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Set p3 = (p1 offset by 800.00 towards (Angle from p1 to p2) degrees)
          • Unit - Order (Triggering unit) to Human Blood Mage - Flame Strike p3
          • Trigger - Turn on (This trigger)
          • Custom script: call RemoveLocation(udg_p3)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_p1)
      • Custom script: call RemoveLocation(udg_p2)
 
Level 9
Joined
Apr 7, 2010
Messages
480
i have a problem with Maker's trigger

"Unit - Order (Triggering unit) to Human Blood Mage - Flame Strike p3"

the ability is custom
 
Level 9
Joined
Apr 7, 2010
Messages
480
  • Arrow System Addon
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Issued order) Equal to (Order(clusterockets))
    • Actions
      • Set p1 = (Position of (Triggering unit))
      • Set p2 = (Target point of issued order)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between p1 and p2) Greater than 1000.00
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Set p3 = (p1 offset by 1000.00 towards (Angle from p1 to p2) degrees)
          • Unit - Order (Triggering unit) to Neutral Tinker - Cluster Rockets p3
          • Trigger - Turn on (This trigger)
          • Custom script: call RemoveLocation(udg_p3)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_p1)
      • Custom script: call RemoveLocation(udg_p2)
Base Order ID : clusterrockets
Order String : channel
Cast Range : 1000

the trigger didnt work, post if you need more information about the ability.

EDIT : btw, the base order id is edited (pink) too, should i refer to before it was edited?

also, i did import many spells in my map, i already have temp units so some triggers might mess up. 'dont know anything about custom scripts aside from copying. hahaha lol'
 
Level 9
Joined
Apr 7, 2010
Messages
480
OHH YEAA! thanks guys!!! +rep SOLVEEEEE :)

another problem... got to spread more rep. sorry guys. :(
 
Status
Not open for further replies.
Top