• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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
 
  • 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
 
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.
 
: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.
 
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.
 
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.
Back
Top