Chat message opens spell for triggering player.

Status
Not open for further replies.
Level 5
Joined
Mar 24, 2020
Messages
80
Hello,

Is it possible from an event where you can force a player into casting a spell?

For example the player types -clear, the ability begins so the player now has the AOE selection opened and then the player selects the area that they want cleared from trees.

I know you can trigger a unit to cast a spell, it's the point before that where the player is basically made to direct where the spell is being cast.

Hope that makes sense!
 
You can catch when an ability button is pressed using this (Added in Patch 1.31+):
  • Events
    • Game - Button for ability Shadow Strike and order Night Elf Warden - Shadow Strike pressed.
And you can force a hotkey using this:
  • Actions
    • Game - Force Player 1 (Red) to press the key A.
So when you type -clear, you can force the Hotkey for your "Clear" ability to be pressed.

Note that the forcing hotkey action will have a delay on bnet so it's kind of crappy...

This can also be done using Mouse events. An example of this: Modular Mouse Spells v1.2

Furthermore, you can use OSKey to gain access to all of the keyboard hotkeys: [vJASS] - OSKeyLib

This could allow you to skip the -clear command entirely, and use a hotkey instead. Same goes for the need of an ability/forcing hotkey, as you can use the Mouse events to mimic this behavior.
 
Last edited:
An almost instant way would be extracting that aoe spell texture, save it as a model then when the player types something move the model to the position of the mouse then if the player left clicks anywhere on the map pick all trees inside that radius and destroy them.
 
You can catch when an ability button is pressed using this (Added in Patch 1.31+):
  • Events
    • Game - Button for ability Shadow Strike and order Night Elf Warden - Shadow Strike pressed.
And you can force a hotkey using this:
  • Actions
    • Game - Force Player 1 (Red) to press the key A.
So when you type -clear, you can force the Hotkey for your "Clear" ability to be pressed.

Note that the forcing hotkey action will have a delay on bnet so it's kind of crappy...

This can also be done using Mouse events. An example of this: Modular Mouse Spells v1.2

Furthermore, you can use OSKey to gain access to all of the keyboard hotkeys: [vJASS] - OSKeyLib

This could allow you to skip the -clear command entirely, and use a hotkey instead. Same goes for the need of an ability/forcing hotkey, as you can use the Mouse events to mimic this behavior.

I'll give this a go! Cheers Uncle.
 
Status
Not open for further replies.
Back
Top