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. The Lich King has a new champion. The results for the 19th Icon Contest are here!
    Dismiss Notice
  5. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    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.

[Solved] Frenzy (ability) - what "Issue order" to use in order to cast it?

Discussion in 'Triggers & Scripts' started by Martinus, Nov 24, 2016.

  1. Martinus

    Martinus

    Joined:
    Dec 27, 2014
    Messages:
    80
    Resources:
    0
    Resources:
    0
    Good day,

    please, what trigger-order should be issued in order for a unit to immediately cast a "Frenzy" (self-targeted, no-mana cost Bloodlust) ability upon itself?

    P.S.: I have already tried "Issue order targeting a unit: Bloodlust (Orc - Shaman ability)", "Issue order with no target: Bloodlust - activate (Orc - Shaman ability), Berserk (Orc - Troll Berserker ability)".
     
    Last edited: Nov 24, 2016
  2. Grimhollow

    Grimhollow

    Joined:
    Oct 29, 2016
    Messages:
    83
    Resources:
    0
    Resources:
    0
    make sure you issued it to 'ordered unit' to make it self ordering
     
  3. Martinus

    Martinus

    Joined:
    Dec 27, 2014
    Messages:
    80
    Resources:
    0
    Resources:
    0
    Do you mean to make it like "Unit - Order Raging Quilbeast 0001 to Shaman - Bloodlust Raging Quilbeast 0001"? If yes, then I have done that, but it is not working.
     
  4. BloodSoul

    BloodSoul

    Joined:
    May 10, 2009
    Messages:
    768
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Isn't that a spell that has no target point/unit?
     
    Last edited: Nov 24, 2016
  5. Martinus

    Martinus

    Joined:
    Dec 27, 2014
    Messages:
    80
    Resources:
    0
    Resources:
    0
    Yes, it is that one. Normally, it is used by a Beastmaster┬┤s advanced pig-summon.
     
  6. BloodSoul

    BloodSoul

    Joined:
    May 10, 2009
    Messages:
    768
    Resources:
    2
    Spells:
    2
    Resources:
    2
    All right, that spell order is frenzy.

    You can use this custom script in your trigger:
    • Custom script: call IssueImmediateOrder(YourUnitHere, "frenzy")
     
  7. Martinus

    Martinus

    Joined:
    Dec 27, 2014
    Messages:
    80
    Resources:
    0
    Resources:
    0
    BloodSoul, and how should I identify my unit in the "YourUnitHere"? What should I write there, please? I have never been working with Custom scripts.
     
  8. BloodSoul

    BloodSoul

    Joined:
    May 10, 2009
    Messages:
    768
    Resources:
    2
    Spells:
    2
    Resources:
    2
    It depends... Is that unit stored in a variable, or should it cast the spell after certain event?

    For now, if it's stored in a variable, you should use a certain prefix (udg_), for example:
    • Set Caster = blablabla
    • -------- LATER --------
    • Custom script: call IssueImmediateOrder(udg_Caster, "frenzy")


    If it's a triggering unit, you should use: GetTriggerUnit()
    • Custom script: call IssueImmediateOrder(GetTriggerUnit(), "frenzy")


    Or if it the last created unit:
    • Custom script: call IssueImmediateOrder(bj_lastCreatedUnit, "frenzy")
     
  9. Martinus

    Martinus

    Joined:
    Dec 27, 2014
    Messages:
    80
    Resources:
    0
    Resources:
    0
    It is meant to be a Unit event action. I am mostly dealing with "attacked unit".

    Edit. 1: It is not stored in Variable.
     
  10. BloodSoul

    BloodSoul

    Joined:
    May 10, 2009
    Messages:
    768
    Resources:
    2
    Spells:
    2
    Resources:
    2
    For that event, GetTriggerUnit() refers to the attacked unit; GetAttacker() is for the attacking unit.

    Attacked Unit is pretty much useless. When you use it, the game will ask for the GetTriggerUnit().

    Code (vJASS):

    function GetAttackedUnitBJ takes nothing returns unit
        return GetTriggerUnit()
    endfunction
     
     
  11. Martinus

    Martinus

    Joined:
    Dec 27, 2014
    Messages:
    80
    Resources:
    0
    Resources:
    0
    Thank you, BloodSoul. I will try it and see what can be done. If there are any problems, I will be writing here. If not, then it is right. Thank you again for your help.
     
  12. Hermit

    Hermit

    Joined:
    May 29, 2013
    Messages:
    1,207
    Resources:
    3
    Models:
    2
    Icons:
    1
    Resources:
    3
    You can also copy that single line to an empty trigger and convert it to custom text (Edit --> Convert to Custom Text). Then just replace e.g. 'thunderclap' with 'frenzy' and use it in a custom script in your original trigger.

    Convert this:
    • Unit - Order (Triggering unit) to Human Mountain King - Thunder Clap

    to this:
    Code (Text):
        call IssueImmediateOrderBJ( GetTriggerUnit(), "thunderclap" )
    Just replace "thunderclap" with "frenzy", so it looks like this:
    Code (Text):
        call IssueImmediateOrderBJ( GetTriggerUnit(), "frenzy" )
    Copy that into your trigger:
    • Custom script: call IssueImmediateOrderBJ( GetTriggerUnit(), "frenzy" )

    By the way, if you're not sure what the order string is, open the ability in Object Editor and find it in Text - Order String - Use/Turn On
     
  13. Martinus

    Martinus

    Joined:
    Dec 27, 2014
    Messages:
    80
    Resources:
    0
    Resources:
    0
    Interesting. Thank you, Hermit. I appreciate that.

    So I understand it that I need to identify it in trigger (by setting it up in variable, or by simply identifying it in an Even [Unit enters region] and Condition [Entering unit is Shaman 0001]) in order to subject it to a Custom script (which I understand that the result should be something like: ...GetEnterUnit...).

    And in contrast to it, is it possible to give an order to a unit not identified in trigger Event or Condition? For instance: I have a Map initialization Event. And then, I create a Custom script in the Action section, ordering a unit to cast an ability. Is it able to recognize such a unit with that Custom script (even if it is not specified by a variable or in Event and Condition section)? For example, I will have a Shaman 0001 placed in the Editor and would like him to cast Bloodlust.
     
  14. Hermit

    Hermit

    Joined:
    May 29, 2013
    Messages:
    1,207
    Resources:
    3
    Models:
    2
    Icons:
    1
    Resources:
    3
    If you're using Unit Enters Region event, it should look like this: call IssueImmediateOrderBJ( GetEnteringUnit(), "frenzy" )
    Btw, Entering Unit is just one way to reference a unit, but you can (and should) use Triggering Unit in most cases.
    You can select pre-placed units like this:
    1.png 2.png

    After you select the unit(s) it'll look like this:
    • Unit - Order Shaman 0001 <gen> to Orc Shaman - Bloodlust Grunt 0002 <gen>

    or like this if you convert it to custom script:
    • Custom script: call IssueTargetOrderBJ( gg_unit_oshm_0001, "bloodlust", gg_unit_ogru_0002 )
     
    Last edited: Nov 25, 2016
  15. Martinus

    Martinus

    Joined:
    Dec 27, 2014
    Messages:
    80
    Resources:
    0
    Resources:
    0
    Thank you again, Hermit. So is it not possible to cast Frenzy without using a custom script?
     
  16. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,502
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    IssueTargetOrderBJ()
    is the same exact thing as the GUI function. I'm confused as to why you would need a custom script to order a unit to cast an ability.

    Are you certain that the trigger is running?
     
  17. Kyrbi0

    Kyrbi0

    Joined:
    Jul 29, 2008
    Messages:
    7,969
    Resources:
    1
    Models:
    1
    Resources:
    1
    Ooh, glad you're getting help with this; I literally just had to deal with this the other day. Not to co-opt your thread, but have you (or anyone else) noticed that Frenzy doesn't seem to act like Bloodlust in one very important way: it doesn't resize the caster like it says it should. Anyone?

    Because somehow, Blizzard forgot to include "Neutral Quillboar - Frenzy" as one of the options for "Unit Casts a Spell With No Target". Was just dealing with this the other day; frustrating.
     
  18. Martinus

    Martinus

    Joined:
    Dec 27, 2014
    Messages:
    80
    Resources:
    0
    Resources:
    0
    KILLCIDE, I apologize to you for a late reply, but I did not have a time in these last times. I would need to re-check it once more, but I think that the trigger was running, as I have had there a "Floating text" being displayed (as a checking mechanic), but the ability was not casted.

    Kyrbi0: I have not noticed it, and I see that it is set up a Scaling Factor in Object Editor. And Kyrbi0, so should I understand it that it is not able to cast it by "Issue order" function?
     
  19. Kyrbi0

    Kyrbi0

    Joined:
    Jul 29, 2008
    Messages:
    7,969
    Resources:
    1
    Models:
    1
    Resources:
    1
    The ability has a field labeled Scaling Factor, but in my tests it has no effect on the target. Same for you?

    I mean, yeah? Isn't that why you made the topic in the first place? There's no GUI function to call.
     
  20. Martinus

    Martinus

    Joined:
    Dec 27, 2014
    Messages:
    80
    Resources:
    0
    Resources:
    0
    Yes, it is the same for me. And yes, that is the reason of my topic, but I want to be sure if I have not overlooked it by accident.