HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Order a unit to use an ability

07-06-2007, 12:21 AM#1
ShadowDestroyer
Easy question. Don't kill me for using GUI...

Anyhow, in a trigger, I want to order a caster to use an ability. However, the ability I want the caster to use is not listed in the GUI. What do I need to type in the ???? to make the caster use ability A07A? If you give me the needed Jass I can use "Custom Script".
Heal simplification P1
Trigger:
Collapse Events
Unit - A unit comes within 400.00 of Tier Zero 0037 <gen>
Collapse Conditions
((Triggering unit) is A Hero) Equal to True
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Collapse Actions
Set TempPoint = (Position of (Attacking unit))
Unit - Create 1 caster (Caster System) for Neutral Passive at TempPoint facing Default building facing (270.0) degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to ???? (Triggering unit)
Custom script: call RemoveLocation( udg_TempPoint )
07-06-2007, 12:44 AM#2
TaintedReality
Quote:
Anyhow, in a trigger, I want to order a caster to use an ability. However, the ability I want the caster to use is not listed in the GUI. What do I need to type in the ???? to make the caster use ability A07A? If you give me the needed Jass I can use "Custom Script".

Remember you're issuing an order, not actually telling the caster to use X ability. So, you need to find the order string of your ability, which is the same as the ability you based it off of. So find the ability you based it off of in the list and use that.
07-06-2007, 12:44 AM#3
Anopob
What ability? If it's a custom spell off of a base spell, say, Storm Bolt, then use Storm Bolt in the GUI thing.

EDIT: Lol we posted at about the same time.
07-06-2007, 12:49 AM#4
ShadowDestroyer
It is based off of Healing Salve... Which is important, because it is dispelled upon attack. But I see nothing similar to it, unless you mean rejuvenation.
07-06-2007, 01:07 AM#5
TaintedReality
I'm not sure if you can order units to use item abilities. I might be wrong though, someone will have to clarify.

What you should do, is make a test trigger which detects when a unit is issued an order targeting another unit. Then, have it display the order string of the issued order to all players. Test the map and use your ability on a unit and see what order string comes up. If nothing comes up, you'll have to find a new ability, and if something does come up then you can use a line of custom script to do it. I'm pretty sure you won't find it in GUI though.
07-06-2007, 01:08 AM#6
sas_Skorpion
Just find in object editor your spell data and search a line called Text - Order String - Use/Turn On (something) that something is the command/order that you need in issue order
07-06-2007, 01:09 AM#7
TaintedReality
Quote:
Just find in object editor your spell data and search a line called Text - Order String - Use/Turn On (something) that something is the command/order that you need in issue order

Healing Salve is an item ability, so that field will simply be set to None in the object editor.
07-06-2007, 01:12 AM#8
Tide-Arc Ephemera
Quote:
Originally Posted by ShadowDestroyer
It is based off of Healing Salve... Which is important, because it is dispelled upon attack. But I see nothing similar to it, unless you mean rejuvenation.

Change the order to something like Holy Light, and then issue an order for the unit to cast Holy Light.

It doesn't take the physical spell, just the order string.

*EDIT - Why don't you just use Rejuvenation? That has a field to do dispel-on-attack.
07-06-2007, 01:19 AM#9
sas_Skorpion
Quote:
Healing Salve is an item ability, so that field will simply be set to None in the object editor.

why is that a problem he can put whatever command he likes .... he can put holy light to be the order string ...