'move' order it's not recognised?!

Monovertex

Formerly Smith_S9
Reaction score
1,461
I encounter this problem in GUI, but because i made my spell in Jass, I'll post here.


Code:
//***|Raw Codes|***

function Psihic_Blast_Psihic_Buff takes nothing returns integer
 return 'B000' //RawCode of the Psihic Blast buff
endfunction

//Conditions-----------------------------------------------------------------

function Psihic_Blast_Conditions takes nothing returns boolean
 return GetUnitAbilityLevel(GetTriggerUnit(), Psihic_Blast_Psihic_Buff()) > 0 and String2OrderIdBJ("move") == GetIssuedOrderId()
endfunction

//Actions--------------------------------------------------------------------

function Psihic_Blast_Actions takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_Psihic_Blast takes nothing returns nothing
    set gg_trg_Psihic_Blast = CreateTrigger(  )

    call TriggerRegisterAnyUnitEventBJ( gg_trg_Psihic_Blast, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
    call TriggerAddCondition( gg_trg_Psihic_Blast, Condition( function Psihic_Blast_Conditions ) )
    call TriggerAddAction( gg_trg_Psihic_Blast, function Psihic_Blast_Actions )
endfunction

The actions doesn't matter. The problem is that the trigger simply doesn't fires with both those conditions. If I remove the "String2OrderIdBJ("move") == GetIssuedOrderId()" the trigger works. Any solution? Thanks in advance. :)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Well, "move" only happens with the move button.
Right-clicking for example is the order "smart".


> Psihic

Looks like weird spelling :p
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
Okay, thank you cery much. Another question: the computer uses one of these orders? Which one?

It's spelled in my language, I didn't knew how it is in english :D
 

Daelin

Kelani Mage
Reaction score
172
You can check if (Target Point of Issued Order)!=null and that the order is one of the four possible non-magical orders (smart, move, attack, patrol). As you know,they all can target a point.

~Daelin
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
@Daelin: Ty for the tip, this replaces the bunch of conditions (I don't how to use that '...!' thingie :eek: )

@Maybe, but my GetOrderPointLoc() was in the trigger condition. And my problem was that I was checking for the wrong order :p Anyway, +rep for all :)

EDIT: Ace and Daelin, I must spread around first :eek: phyrex1an, you have disabled rep so...=/
 
General chit-chat
Help Users

      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