• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] Custom Ability

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243
Just make a custom ability, look at the order-string id, then whatever is written there (example flamestrike) then make the unit cast Blood Mage- Flame Strike.

The order string doesn't affect how you order a unit to cast an ability. Base order id does.

For example if you change the order string of Carrion Swarm to flamestrike and order the unit to cast Flame Strike, the unit won't cast the ability. Ordering the unit to cast Carrion Swarm will make it cast the ability.

But yeah, if the order string isn't modified then that is a good cue on the base order id.

There are only a few abilities that allow modification of the base order id. Channel is the most useful one.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
The order string doesn't affect how you order a unit to cast an ability. Base order id does.

For example if you change the order string of Carrion Swarm to flamestrike and order the unit to cast Flame Strike, the unit won't cast the ability. Ordering the unit to cast Carrion Swarm will make it cast the ability.

But yeah, if the order string isn't modified then that is a good cue on the base order id.

There are only a few abilities that allow modification of the base order id. Channel is the most useful one.

Is that so? Then it looks like I've been doing things wrong for a while now...

Thanks for clarifying that Maker!
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Ups wrong grammer, my bad
I mean, what should I write on the custom script triggers??
I want the Cumputer / AI cast a spell with that custom script triggers function ;) ;)
Pleasee.... Help

Try this one:

  • Custom script: call IssueTargetOrderBJ( GetSpellAbilityUnit(), "heal", GetSpellTargetUnit() )
It orders the Casting unit to cast Heal to the Traget of Ability Being Cast

Its just an example and I dont know if I am correct.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Try this one:

  • Custom script: call IssueTargetOrderBJ( GetSpellAbilityUnit(), "heal", GetSpellTargetUnit() )
It orders the Casting unit to cast Heal to the Traget of Ability Being Cast

Its just an example and I dont know if I am correct.

Avoid BJs.

You could also use IsuueTargetOrder and/or IssuePointOrder, like this:
  • Custom Script: call IssueTargetOrder( GetSpellAbilityUnit(), "heal", GetSpellTargetUnit() )
In my current knowledge of JASS I don't think this single line is enough.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
TQ
Where should I put spell ID?? And where I must put the casting unit?? And targeted units
Hehe
+ REPT

It is just an example, first you should experiment with ordering units on casting ability. And the spell ID can be found on the ability itself in Object Editor. Go to ability and found for example Flame Strike, then go look for Order String - Use/Turn On.

After experimenting and you have make a trigger like this for example, JUST FOR EXAMPLE:

  • Unit - Order Vampire_Lord to Undead Dreadlord - Carrion Swarm (Position of (Attacking unit))
now convert it to JASS by going to Trigger Editor >> Edit and Convert to Custom Text. After that you will find out the Custom Script for the Command Trigger.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
TQ
Where should I put spell ID?? And where I must put the casting unit?? And targeted units
Hehe
+ REPT

Bro,

Things are called differently in GUI as they are called in JASS. The casting unit in this case is the GetSpellAbilityUnit() and the target unit is GetSpellTargetUnit().


Now if you're going to convert in anyways and change nothing at all then the whole point of using the custom script is pointless because the one in the script you converted is the same as the one in the GUI action.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
In GUI, it's just Originals spell on Blizzard :/ :/
That " Units - Issue Order to Target Unit " Triggers
How do I issue to cast custom spells??
Humm.... Humm....

Yes but for example you created an ability, go look for Its Order String - Use/Turn On and whatever ability it said, that IS what you are gonna use for the trigger. The trigger in the Issue is refering actually to the ID of the ability if you will notice.

So for example, you created an ability named Hell Strike based on Flame Strike, go see its Order String Use/Turn On nd it displays flamestrike right? Now go to triggers and Issue the unit to cast Flame Strike because thats the Order String of the ability Hell Strike.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
Basically FRENGERS to make a unit cast a custom spell (I'm dumbing it down for you; or if you don't understand that, I am making it simpler), let's say you base the custom ability off of Flame Strike.

Just use the Unit - Issue Order action to make the unit cast Flame Strike.

To make things even more simpler, there is a field in the Object Editor (a field in the Object Editor means a line (horizontal line) of text where you can edit things) that says Base Order ID. Now if you based a spell on Flame Strike, that field will contain the words flamestrike.

Again just make the unit cast Flame Strike. (Just don't add the original, un-edited ability to the unit)

The test map Hell_Master or someone's going to be provide will contain what I just said.

To make things more simpler, to make a unit cast a custom ability, look at the Base Order ID of the ability in the Object Editor (the Object Editor can be accessed by clicking the Helm Icon you see in the WE; WE means World Editor btw) and whatever is on that field make the unit cast that.
 
Status
Not open for further replies.
Top