• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Custom Script for setting a point to "target point of ability being cast"

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
  • Unit - Order ATAT to Attack Ground (Target point of ability being cast)
I would like to make that action without leaking, and preferably without making a point variable and destroying it. I would like to move a point variable so I want something like:

  • Custom script: call MoveLocation(udg_LocationMove1, udg_x, udg_y)
But I don't know the Jass command for getting the target point of the ability being cast.

Thanks to all you JASS programmers for being so helpful.

Darwin
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Custom script: call MoveLocation(udg_LocationMove1, GetSpellTargetX(), GetSpellTargetY())
EDIT:
  • Custom script: call IssuePointOrderById(*unit*, 851984, GetSpellTargetX(), GetSpellTargetY())
^That would order the unit to attack ground on target coordinates of ability being cast.

Replace the *unit* with your unit, like

GetTriggerUnit() = triggering unit
bj_lastCreatedUnit = last created unit
udg_variable if the unit is in variable
 
Level 7
Joined
May 13, 2011
Messages
310
I just used your trigger that you said and converted it to custom code:

JASS:
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attackground", GetSpellTargetLoc() )

Of course, replace GetLastCreatedUnit() with your unit. Or you could do what Maker said, I think it'll work both ways.
 
Level 7
Joined
May 13, 2011
Messages
310
:hohum:... Oh yeah...


:ogre_hurrhurr:


But even so, I don't see the difference between my code and Maker's. They seem to do the same thing.
 
Level 7
Joined
May 13, 2011
Messages
310
Ah yes... I just thought he wanted to know how to grab the Location using JASS, so that he could, for example, use it in another function.

I'll be more careful next time.
 
Level 14
Joined
Aug 30, 2004
Messages
909
Ah yes... I just thought he wanted to know how to grab the Location using JASS, so that he could, for example, use it in another function.

I'll be more careful next time.

I certainly appreciate your help, though.

I have a rather complicated map with a custom movement system, so I'm just trying to minimize processing and avoid using point locations when I can.

+rep to all of you, and thanks especially to Maker.
 
Status
Not open for further replies.
Top