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

Spell - Sleep but with a projectile

Status
Not open for further replies.
Level 16
Joined
Apr 20, 2014
Messages
524
Hello,


I would like to create a Sleep-like ability for an Assassin hero. He will just throw a Sleeping Dart to asleep someone.
But it's in the "Throw" part I have trouble.

I tried to recreate the ability without triggers by adding a projectile, its speed and all... But nope. It does not show anything.

Have I missed something?
 
Level 11
Joined
Oct 16, 2013
Messages
246
If you don't mind coding some dummies, you could try using a damage detection system, make a dummy spell for your hero, a dummy unit that casts a spell (which does have a missile effect) on the same target, detect damage done by unit-type of the dummy and make it cast the real sleep spell.

Or maybe you could use some stunning bolt spell, check for units stunned with a specific buff, remove the buff and have your sleep spell casted by a dummy.
 
Level 16
Joined
Apr 20, 2014
Messages
524
Thank you for all your answers!

I checked your code @Devalut
It's working and all but... isn't it too much? I wanted to import it on my other map and there were like 20 variables missing.
So I would have for each map (since it's for a campaign) that amount of data I will not even use?

If you have another solution I will take it! (I am currently looking for the second solution suggested by gusanomental)
 
Level 16
Joined
Apr 20, 2014
Messages
524
Not really an error, but if I want to use the ability across different Chapters, I have to recreate each variable for each maps.
And I don't think it's really worth it :/
 
Status
Not open for further replies.
Top