• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Make unit start casting ability (to target phase)

Status
Not open for further replies.
Level 4
Joined
Dec 26, 2021
Messages
45
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 18
Joined
Mar 16, 2008
Messages
721
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 25
Joined
Sep 26, 2009
Messages
2,381
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
45
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