• 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.

[JASS] JASS Order, Cast, and Commands For Units

Status
Not open for further replies.
Level 6
Joined
May 13, 2007
Messages
231
I created this thread for anyone to put JASS strings that order units to do such and such that are not in the basic default choices in the GUI order actions. Or for others requesting help like I have. I hope this thread comes in handy. It has already solved my own problem. :grin:
 
Last edited:
Level 22
Joined
Feb 26, 2008
Messages
892
Here's what AceHart says on the subject:

AceHart said:
For the record, the ability "item illusion" can be cast with:

Custom script: call IssueTargetOrderById(bj_lastCreatedUnit, 852274, GetTriggerUnit())

This orders the "last created unit" to "item illusion" the "triggering unit".

By the way, you might try reading my JASS tutorial. It's pretty simple.

http://www.hiveworkshop.com/forums/showthread.php?t=62279
 
Level 7
Joined
Oct 5, 2007
Messages
118
Hm, cause your ability is original an item spell, you have to use the OrderId
JASS:
call IssueTargetOrderById(Dummy, 852274, Target)
 
Level 6
Joined
May 13, 2007
Messages
231
Ok, dumb question, but how do I find the ID like that? I mean, for other spells with the same problem. Also, thanks for the help, both of you.
 
Level 7
Joined
Oct 5, 2007
Messages
118
Make a trigger, with all Any Unit is Ordered events... and then give a test unit on the map your testing spell.
As action in that trigger you have something like: call BJDebugMsg("OrderId is " + I2S(GetIssuedOrderId())).
Then you will see the orderIds of all orders given in the map.
 
Level 7
Joined
Oct 5, 2007
Messages
118
This would be the trigger:
  • OrderIds
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Custom script: call BJDebugMsg("Issued OrderId = <" + I2S(GetIssuedOrderId()) + "> OrderString = " + OrderId2StringBJ(GetIssuedOrderId()))
I only took 'BJDebugMsg' cause it's the shortest function to show a game message :)
 
Level 6
Joined
May 13, 2007
Messages
231
I am puzzled... I tried your trigger to find the ID, I did, it was 852274, I plugged it into the string and trigger of:
  • Test
    • Events
      • Player - Player 1 (Red) types a chat message containing test as An exact match
    • Conditions
    • Actions
      • Custom script: call IssueTargetOrderById( gg_unit_hrif_0064, 852274, gg_unit_U008_0006 )
The first unit is a unit on map that has the ability and the other is a unit thats just the guinea pig. It still doesn't work.. I think its impossible to do item abilities like this, or atleast with my limited JASS knowledge. -.-'
 
Level 7
Joined
Oct 5, 2007
Messages
118
Has the caster enough mana? Is the target near enough? Can the spll be castet on the pig? There are many factors which could block the spell to be casted...
And this spell works with the id, I used it quite often :)
 
Level 6
Joined
May 13, 2007
Messages
231
It has no mana cost, 999999 range, targets it 100% sure, I've casted it manually before so I know it can target my pig. I just don't know why it won't work. -.-
 
Last edited:
Status
Not open for further replies.
Top