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

[General] Target Point of 'Unit Finishes casting an Ability'

Status
Not open for further replies.
Hello guys,

Is there a way to detect the target point of the ability based of the event 'Unit Finishes casting an Ability'?

This doesn't work:
  • Events
    • Unit - A unit Finishes casting an ability
  • Conditions
  • Actions
    • Set TempPoint = (Target point of ability being cast)
The reason why i need this, cuz i'm using the 'Flamestrike' ability and it requires some casting time.


Thank you. :)
 
Level 3
Joined
May 17, 2019
Messages
45
Are you looking for the target point during the green area, or during the fire pillars ?
Because if you are looking for the green area, you can't use 'finishes casting' since the spell is not finished casting yet, due to cast delay.
 
Level 8
Joined
May 21, 2019
Messages
435
Hello guys,

Is there a way to detect the target point of the ability based of the event 'Unit Finishes casting an Ability'?

This doesn't work:
  • Events
    • Unit - A unit Finishes casting an ability
  • Conditions
  • Actions
    • Set TempPoint = (Target point of ability being cast)
The reason why i need this, cuz i'm using the 'Flamestrike' ability and it requires some casting time.


Thank you. :)
Admittedly, I have no idea how Flamestrike acts with "begins the effect of", but locations are effectively lost once a spell finishes casting.
What you can do, is have a hashtable of units casting flamestrike, and then save the location of the most recent "begins casting" flamestrike target saved as a point, using the casting unit as the key. Remember to clean previous points from the memory before assigning a new one.
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
Since by the time the "starts the effect of" occurs the spell can't be cancelled you don't need a hashtable and can do it the simple GUI way:

  • Set CounterA = CounterA + 1
  • Set FSPoint[CounterA] = (Target point of spell being cast)
  • Wait APPROPRIATE DURATION game-time seconds
  • Set CounterB = CounterB+1
  • -------- do stuff with FSPoint[CounterB] --------
  • call RemoveLocation(udg_FSPoint[udg_CounterB]
  • If (All conditions are true) then do (Then actions) else do (Else actions)
    • If - Conditions
      • CounterA equal to CounterB
    • Then - Actions
      • Set CounterA = 0
      • Set CounterB = 0
    • Else - Actions
 
Hello guys,

Is there a way to detect the target point of the ability based of the event 'Unit Finishes casting an Ability'?

This doesn't work:
  • Events
    • Unit - A unit Finishes casting an ability
  • Conditions
  • Actions
    • Set TempPoint = (Target point of ability being cast)
The reason why i need this, cuz i'm using the 'Flamestrike' ability and it requires some casting time.


Thank you. :)
Flame Strike can use the event "Unit starts the effect of an ability".
 
Status
Not open for further replies.
Top