1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  4. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] Changing "Order String - Use/Turn on" that is "None" by default

Discussion in 'Triggers & Scripts' started by DNA.h, Mar 12, 2014.

  1. DNA.h

    DNA.h

    Joined:
    Jan 23, 2014
    Messages:
    14
    Resources:
    0
    Resources:
    0
    Hi all
    My question is simple but unfortunately i couldn't find a proper answer on hive so i made a thread about it.
    There is an ability on default wc3 abilities list called "Item Area Healing", I want a dummy caster to cast this ability. The problem is that this spell has "Text - Order String - Use/Turn on" property set to "None" by default, so I changed that to something else (thunderclap to be specific) then i created a trigger like this:

    Code (vJASS):

    function CoH_Actions takes nothing returns nothing
       local location lpU
       set lpU=GetUnitLoc(GetTriggerUnit())
       call CreateNUbitsAtLoc(1,'n002',GetOwningPlayer(GetTriggerUnit()),lpU,bj_UNIT_FACING)
       call UnitAddAbility(bj_lastCreatedUnit,'A01J')
       call IssueImmediateOrder(bj_lastCreatedUnit,"thunderclap")
       call KillUnit(bj_lastCreatedUnit)
       call RemoveLocation(lpU)
    endfunction
    //n002 is dummy caster and 'A01J' is my spell based on area healing
     


    The problem is that the dummy unit don't use that spell, when i changed the 'A01J' with other spells (which had some order strings by default) like Thunderclap , Berserk or Fan Of Knives it did work perfectly.

    so my question is this: I can't set "order string - use" for an ability if it is "None" be default? or did i forgot something and messed up somewhere?
     
  2. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,700
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Find out the order ID

    • debug
      • Events
        • Unit - A unit Is issued an order targeting a point
        • Unit - A unit Is issued an order with no target
        • Unit - A unit Is issued an order targeting an object
      • Conditions
      • Actions
        • Custom script: call BJDebugMsg(I2S(GetIssuedOrderId()))


    then use
    IssueImmediateOrderById
    or whatever native is associated with that order type.
     
  3. DNA.h

    DNA.h

    Joined:
    Jan 23, 2014
    Messages:
    14
    Resources:
    0
    Resources:
    0
    Thanks , worked completely. I was stuck heavily at this point.
    for others that wonder the OrderId was 852273 .
     
  4. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    As a general rule orderstrings are kind of inconsistent and orderids are the way to go in any situation.
     
  5. DysfunctionaI

    DysfunctionaI

    Joined:
    Mar 6, 2006
    Messages:
    281
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Also worthy to note that you cannot change "Order String - Use" as it will do nothing. The only ability that lets you change the order ID is Channel.
     
  6. DNA.h

    DNA.h

    Joined:
    Jan 23, 2014
    Messages:
    14
    Resources:
    0
    Resources:
    0
    yeah all that replays were useful, although i couldn't find them last night