• 🏆 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!

[Trigger] Smartcast trigger?

Status
Not open for further replies.
Level 1
Joined
Jan 13, 2013
Messages
2
Hey is it possible to make a smartcast trigger?:vw_wtf: like, if i hold down shift and then press the keybinding of my custom abillity i will cast it instantly if aimed at selectable target? like smartcast in league of legends. thank you!
 
Level 15
Joined
Nov 30, 2007
Messages
1,202
  • pressed
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
    • Conditions
    • Actions
      • Set pressed = True
  • released
    • Events
      • Player - Player 1 (Red) Releases the Left Arrow key
    • Conditions
    • Actions
      • Set pressed = False
  • Spell
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • pressed Equal to True
    • Actions
      • Unit - Order (Triggering unit) to Stop
      • -------- Do spell here! --------
Don't know how to change from arrow press to shift, perhaps esc will do... Don't know if your spell can use this workaround, but to give you an idea perhaps?
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Don't know how to change from arrow press to shift, perhaps esc will do... Don't know if your spell can use this workaround, but to give you an idea perhaps?

The problem is that you need to detect the player's mouse position when the ability is cast. If you were to somehow do this (I think it was possible with Reinventing the Craft), it would also mean that you must choose between smartcast always on and always off.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
The problem is that you need to detect the player's mouse position when the ability is cast.

Trackable can do that I guess. A map covered with trackables and abilities that requires no target that work as dummy spells with hotkeys. When used you detect the position of the mouse via trackable then detect what spell was used and then do its effect. But a system like that will be very complicated and will require lots of math calculations.
 
Status
Not open for further replies.
Top