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

Casting an ability than removing it

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
  • Unit - Create 1 Peasant for Player 1 (Red) at (Center of (Playable map area)) facing (Position of (Triggering unit))
  • Selection - Clear selection for Player 1 (Red)
  • Selection - Select (Last created unit) for Player 1 (Red)
  • Unit - Add 0 to (Last created unit)
  • Game - Force Player 1 (Red) to press the key Q
  • Unit - Remove 0 from (Last created unit)
I thought this would work but it doesn't. It only works if I let the ability stay on the peasant, which I don't want to do.

As far as motives go (using selection and force ui presses instead of issueing a cast), don't worry about it I'm just experimenting
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
I know this issue, because I made a system for a 5th random ability each third cast.
It depends strongly on the ability you are using. For instance the ability Roar only goes off if you add a small timeout before removing it, removing active avatar will crash the whole game ..
I added a timer with 0.03 timeout, which works very well.
 
Level 5
Joined
Jan 27, 2014
Messages
164
Almost all abilities have casting time (to account for the animation art).
Only a handful some that can cast instantly.

They are:
Windwalk
Berserk
Avatar (of course, it's not wise to remove this upon casting)

There could be few more but I haven't tested myself (like Mana Shield, Immolation etc).
For both Windwalk and Berserk, you can add those abilities to a unit, order cast, and remove immediately.
As for other abilities, you'll have to make sure the unit cast point value is zero as mentioned.

The above are all for unit order casts.

As for force UI key, they won't really work with immediate removal.
Not too sure why, perhaps it's because of the delayed response (similar to key pressed events).
 
Status
Not open for further replies.
Top