• 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.

[Trigger] Presets for ordering units

Status
Not open for further replies.
Level 3
Joined
Jul 29, 2008
Messages
30
Is there any alternative for ordering units to use an ability than the presets? or is it possible to add more to the presets or change them? I want to order a unit to use a custom ability under certain circumstances. There are many instances of this ability so simply changing the base ability wouldn't be effective.

So is there a way around this? A quick fix, or pointing me in the direction of a good tutorial would be greatly appreciated.

Thanks as always, this forum is very helpful to me always.
 
Level 3
Joined
Jul 29, 2008
Messages
30
I'm basing the abilities off of charm which is the only spell I know of that changes a units team. Besides possesion, but that changes the color of the unit then as well kills the casting unit which makes things a bit more complicated, requiring the use of a summoning ability then instantly ordering the unit to use possesion... Much more complicated than just using a replication of charm.

But how do you order a unit to cast an ability besides the presets? or is it just not possible?

The ui keys though... Are those in essence like the memory locations the spells? And I could just change them around so the trigger thinks its ordering one ability but really doing another?
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Neutral Dark Ranger - Charm (for example), just represents the Order String - Use/Turn On "charm" field. Thus, you can in reality cast any ability whose Order String - User/Turn On is equal to a common racial/neutral ability.

In Jass, however, you have complete freedom, for example call IssueTargetOrder(c,"charm",u), so for certain cases in which you can't do the order in GUI (for example cancel), you can use the Jass versions (Note: in the case of cancel you actually need to use an OrderId with call IssueTargetOrderById(unit,orderid,target)).
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
Correct me if I completely miss the point here, but don't you want a unit to be able to use a ability, and only use that ability at a certain moment/event?

In that case, it's pretty simple. You create the unit in the Object Editor, or edit a existing unit. Add the ability you made to "Abilities - Normal".
If you want the ability to activate at a certain moment/event, you'll have to make a trigger for that. The trigger will cause the unit to activate the ability when something happens, like: the units life is lower then X life, the units mana is higher then X mana, the target of the unit loses a buff, or something else depending on the trigger.

If that is what you're looking for, just tell us what should happen to let the unit activate the ability, and we can help you create a trigger for it.
 
Level 3
Joined
Jul 29, 2008
Messages
30
Alright this helps very much. In essence I could already use the abilities with the charm activate. *smacks self on head*. Thanks for the help though everyone.

That Jass is especially interesting as well purplepoot.
 
Status
Not open for further replies.
Top