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 havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. 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.

Autocast Orders

Discussion in 'Triggers & Scripts' started by Wazzz, Mar 2, 2013.

  1. Wazzz

    Wazzz

    Joined:
    Feb 5, 2009
    Messages:
    2,764
    Resources:
    5
    Maps:
    4
    Tutorials:
    1
    Resources:
    5
    In this particular scenario, I am attempting to set a trigger which activates whenever an ability based off of Orb Of Annihilation is used. Problem is, it won't work when it is set to autocast unless you activate it manually when using 'Start of ability's effect' Event. I also want this to apply to other autocast spells such as Inner Fire and Bloodlust.

    Reading up on the matter, I know that I need to set the Event to be based on an Order. Problem is, I don't know which Order to check for with these spells. Can anyone help me out here? I'm just guessing at different Order Strings and have so far had no success.
     
  2. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    • OrderID
      • Events
        • Unit - A unit Is issued an order with no target
        • Unit - A unit Is issued an order targeting a point
        • Unit - A unit Is issued an order targeting an object
      • Conditions
      • Actions
        • Custom script: call BJDebugMsg(OrderId2String(GetIssuedOrderId()) + " ---- " + I2S(GetIssuedOrderId()))
     
  3. Wazzz

    Wazzz

    Joined:
    Feb 5, 2009
    Messages:
    2,764
    Resources:
    5
    Maps:
    4
    Tutorials:
    1
    Resources:
    5
    Thank you for the speedy response ^^

    Well, I got the Orb Of Annihilation ability sort of working. Still requires me to manually cast it, but instead of waiting for the effect, it performs the actions I want before the spell even connects.

    Atm, I have the Event set to 'A unit Is issued an order targeting an object' with the condition being '(Issued order) Equal to (Order(flamingattacktarg))'. Am I doing something wrong here?

    EDIT: Just occurred to me that I could potentially then force the unit to manually cast the spell if the spell is set to autocast, but how do I check if the spell is set to autocast or not? Problem is the Smart order tends to take care of that.

    EDIT: Just occurred to me that potentially I could use the Custom Values as a binary trigger which activates whenever an ability is set to autocast and use an Integer checker for whether the ability is set to autocast or not. Problem is, I'm going to have multiple autocastable abilities on the same unit, so I would need to figure out some sort of legend of numbers to work with which will tell you which ones are activated in combination with which abilities. If I use a unit-type checker, that should make the job a little easier. Still, if there's a more practical solution, I'd prefer that :p
     
  4. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Can't use set the ability to be automatically autocasted, in object editor, Abilities - Default active ability.
     
  5. Wazzz

    Wazzz

    Joined:
    Feb 5, 2009
    Messages:
    2,764
    Resources:
    5
    Maps:
    4
    Tutorials:
    1
    Resources:
    5
    Sorry, I'm not entirely clear as to how that helps my current situation. What I'm wondering is if there's a practical method of checking whether an ability is set to autocast or not when a unit is issued a specific Order.

    EDIT: Actually, I notice that it's only really certain autocastable spells that I have issue with, such as Orb Of Annihilation. Inner Fire works with the Event checking when a unit starts the effect of an ability. That may simplify things for the Custom Value approach.

    EDIT: Alternatively, what if I used a Dummy Spell with autocastability and set the Orb Of Annihilation ability to be hidden. The Dummy Spell could be based off of something like Slow and whenever the unit begins casting the ability, the unit can be ordered to cast the hidden Orb Of Annihilation ability.
     
  6. GhostThruster

    GhostThruster

    Joined:
    Jul 24, 2009
    Messages:
    4,847
    Resources:
    34
    Models:
    7
    Icons:
    21
    Packs:
    1
    Skins:
    1
    Maps:
    3
    Spells:
    1
    Resources:
    34
    u check when orb is on, then u use 'unit is attacked' instead