• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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

Status
Not open for further replies.
Level 5
Joined
Dec 27, 2014
Messages
95
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:
Level 5
Joined
Dec 27, 2014
Messages
95
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.
 
Level 13
Joined
May 10, 2009
Messages
868
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")
 
Level 5
Joined
Dec 27, 2014
Messages
95
It is meant to be a Unit event action. I am mostly dealing with "attacked unit".

Edit. 1: It is not stored in Variable.
 
Level 13
Joined
May 10, 2009
Messages
868
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().

JASS:
function GetAttackedUnitBJ takes nothing returns unit
    return GetTriggerUnit()
endfunction
 
Level 5
Joined
Dec 27, 2014
Messages
95
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.
 
Level 21
Joined
May 29, 2013
Messages
1,567
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:
    call IssueImmediateOrderBJ( GetTriggerUnit(), "thunderclap" )
Just replace "thunderclap" with "frenzy", so it looks like this:
Code:
    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
 
Level 5
Joined
Dec 27, 2014
Messages
95
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.
 
Level 21
Joined
May 29, 2013
Messages
1,567
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...).
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.
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.
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:
Level 37
Joined
Jul 22, 2015
Messages
3,485
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.

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.
Are you certain that the trigger is running?
 

Kyrbi0

Arena Moderator
Level 45
Joined
Jul 29, 2008
Messages
9,502
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?

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.
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.
 
Level 5
Joined
Dec 27, 2014
Messages
95
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?
 

Kyrbi0

Arena Moderator
Level 45
Joined
Jul 29, 2008
Messages
9,502
Martinus said:
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?
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.
 
Level 5
Joined
Dec 27, 2014
Messages
95
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.

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.
 
Level 3
Joined
Aug 25, 2018
Messages
29
Hello I have run into a similar problem...

I want to:
-pick every unit in unit group and issue order targeting a unit.
-the order however is a custom ability (the base dummy ability is a single target ability so that should be ok)
-I am certain many custom spells do this but I am not sure how to custom script it... can I do this?
Custom script: call IssueImmediateOrder(GetPickedUnit(), "exactnameofmycustomabilityhere")

if yes cool... but babysteps! I want them to target a random unit within 300 range of the initial "target unit of ability being cast"

can I do this?
Custom script: call IssueImmediateOrder(GetPickedUnit(), "exactnameofmycustomabilityhere", "randomunitwithin300rangeoftargetunitofabilitybeingcast") <---how would I phrase this in custom script?

thanks!

EDIT: ah! it would be ability ID # instead of exactnameofmycustomablity yea?
 
Status
Not open for further replies.
Top