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

Image Spells

Status
Not open for further replies.
Level 10
Joined
Nov 28, 2008
Messages
655
I was wondering, when you've made a custom UI, meaning removed the default UI and you've added screen images/Dialog Images, how can you make them cast a default skill?


Issue order to the unit, yes?

  • Spell1 (button)
    • Events
      • Dialog - Any Dialog Item is Clicked by Player Any Player
    • Local Variables
    • Conditions
      • (Used dialog item) == Spell1
    • Actions
      • Unit - Order SelectedUnits[(Triggering player)] to (Marine - Use Stimpack) (Replace Existing Orders)
SelectedUnits[(Triggering player)] is the unit.

and

(Marine - Use Stimpack) is the ability.
 
Level 5
Joined
Jul 4, 2007
Messages
166
Well what if the ability needs the player to choose a target?

Check to see if the selected unit meets the spell target requirements, then issue the order to target that unit.

For instance, on heal, check to see if the selected unit is a friendly unit, then order your unit to heal it. On yamato gun, check to see if the selected unit is hostile.

Selection is the easiest way to do it.
 
Level 11
Joined
Aug 1, 2009
Messages
963
doesn't seem that hard.

If you can, when they press the button for the spell, change the users mouse icon and enable 2 triggers, one that is "SpellCancel" that triggers when the player right clicks and one that is "CastSpell" that triggers when they left click. Upon left clicking, it would tell the unit to use the spell on the target point. Upon right clicking, it would change your icon back to normal and disable both triggers.

Kinda hard to describe but meh.
 
Level 10
Joined
Nov 28, 2008
Messages
655
doesn't seem that hard.

If you can, when they press the button for the spell, change the users mouse icon and enable 2 triggers, one that is "SpellCancel" that triggers when the player right clicks and one that is "CastSpell" that triggers when they left click. Upon left clicking, it would tell the unit to use the spell on the target point. Upon right clicking, it would change your icon back to normal and disable both triggers.

Kinda hard to describe but meh.

Have you gone through and seen what abilities can/can't be used through the GUI with "Order unit:: Point" ?

It is extremely limiting.
 
Level 3
Joined
Jun 8, 2006
Messages
37
Sorry to post a bit late, but I've got a question. What if I want the unit to charge the selected enemy when a dialog-button is clicked?
 
Level 3
Joined
Jun 8, 2006
Messages
37
Yeah well, I was unable to find the charge ability in all my noobishness. Turns out, I had to change it to an issued order targeting a unit xD... Don't tell me you wasn't a newb once ;). There's no such thing as stupid questions when you're new.... I think...
 
Status
Not open for further replies.
Top