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

Make unit start casting ability (to target phase)

Status
Not open for further replies.
Level 4
Joined
Dec 26, 2021
Messages
47
Is it possible to add an ability to a unit, select the unit for the player and enter the "targetting" phase of the ability? i.e. flame strike would be added to some unit and player just needs to target the spell location?

It would also be important to detect a) the target being provided for the spell and b) the spell targetting being cancelled.


Muchos gracias
 
Level 21
Joined
Mar 16, 2008
Messages
955
I think something like this? Need to set the (triggering unit) to actual unit variables / point variables tho

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit - Add Flame Strike to (Triggering unit)
      • Selection - Add (Triggering unit) to selection for Player 1 (Red)
      • Unit - Order (Triggering unit) to Human Blood Mage - Flame Strike ((Center of (Playable map area)) offset by (0.00, 0.00))
edit: not sure about entering the ''targeting phase'' maybe use the function that clicks the ability but i can't find that anywhere.
 
Level 29
Joined
Sep 26, 2009
Messages
2,595
I think you can force player's key to be pressed, so if you force player to press the hotkey for an ability the select unit has, it should work out.
  • Game - Force Player 1 (Red) to press the key A.
Edit: But I would be pretty annoyed if the game started pressing keys for me where it made no sense. Just saying.
 
Last edited:
Level 4
Joined
Dec 26, 2021
Messages
47
I think you can force player's key to be pressed, so if you force player to press the hotkey for an ability the select unit has, it should work out.
  • Game - Force Player 1 (Red) to press the key A.
Edit: But I would be pretty annoyed if the game started pressing keys for me where it made no sense. Just saying.
Thanks, would work if i didnt need to detect the cancel but i guess its too much of a catch case do. Otherwise; thisis a fine solution.
 
Status
Not open for further replies.
Top