"GetOrderPointX" gives no value..?

Kazuga

Let the game begin...
Reaction score
110
Ok this is a really easy question still I can not solve it.. I'm using a point ability (such as shockwave, carrionswarm etc,) and I need to get the X and Y from the target point order. I have looked through the function list and "GetOrderPointX/Y" is the only one I can find. Still, when using this it doesn't seem to be the correct call at all since I don't receive any value at all (meaning the point automatically refers to the center of the map.) I'm using this short simple code:
JASS:
set data.tx = GetOrderPointX()
set data.ty = GetOrderPointY()
call AddSpecialEffect("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl",data.tx,data.ty)

to see if it worked. But it doesn't, the effect is created in the center of the map and not where I casted the spell. I'm sure there is a simple solution for this (as always,) but I just can't seem to figure it out..
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
It's for orders like move. Not abilitys.
You have to use the SpellTargetLoc and then get the x and y values I believe.
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
Just to clarify:
JASS:
// EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER
constant native GetOrderPointX takes nothing returns real
constant native GetOrderPointY takes nothing returns real
constant native GetOrderPointLoc takes nothing returns location

// EVENT_UNIT_SPELL_CHANNEL
// EVENT_UNIT_SPELL_CAST
// EVENT_UNIT_SPELL_EFFECT
// EVENT_UNIT_SPELL_FINISH
// EVENT_UNIT_SPELL_ENDCAST
// EVENT_PLAYER_UNIT_SPELL_CHANNEL
// EVENT_PLAYER_UNIT_SPELL_CAST
// EVENT_PLAYER_UNIT_SPELL_EFFECT
// EVENT_PLAYER_UNIT_SPELL_FINISH
// EVENT_PLAYER_UNIT_SPELL_ENDCAST
constant native GetSpellAbilityUnit         takes nothing returns unit
constant native GetSpellAbilityId           takes nothing returns integer
constant native GetSpellAbility             takes nothing returns ability
constant native GetSpellTargetLoc           takes nothing returns location
constant native GetSpellTargetDestructable  takes nothing returns destructable
constant native GetSpellTargetItem          takes nothing returns item
constant native GetSpellTargetUnit          takes nothing returns unit


As you can see you are using natives for the wrong event.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top