• 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] Spell with no order string

Status
Not open for further replies.
Level 3
Joined
Aug 15, 2007
Messages
37
I need to cast an ability that doesn't have an order string. The spell is based off of a moon wells - replenish mana spell.
Here's what I'm trying currently:
  • ChannelMana
  • Event
    • Player- Player 1 gold becomes > 0
  • Actions
    • set group = (units of player 1 of type Mana Well)
    • unit group- pick every unit in group and do multiple actions
    • custom script - call IssueTargetOrderById(GetEnumUnit(),'A006',GetEnumUnit())
Any suggestions?
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
IssueTargetOrderById takes an OrderID, not a spell rawcode.

Here's my code I posted somewhere else in a similar thread, find the orderID when the moonwell casts its spell, and then use that integer.

[jass=(Goes in a trigger called DebugOrderFinder)]function DebugOrderFinder takes nothing returns nothing
call BJDebugMsg(I2S(GetIssuedOrderId()))
endfunction

function InitTrig_DebugOrderFinder takes nothing returns nothing
set gg_trg_DebugOrderFinder = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_DebugOrderFinder,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAnyUnitEventBJ(gg_trg_DebugOrderFinder,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterAnyUnitEventBJ(gg_trg_DebugOrderFinder,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddAction(gg_trg_DebugOrderFinder,function DebugOrderFinder)
endfunction[/code]
 
Status
Not open for further replies.
Top