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

Collision Missles and Channeling

Status
Not open for further replies.
Level 3
Joined
Jul 14, 2007
Messages
34
Alright, I need help with creating collision missiles and channeling spells made through JASS. With the collision missiles I've been looking around and it looks like i just create a dummy unit and use set x and set y with a timer but how do you check for the collisions? And for channeling spells, how do you tell it to stop when the caster stops channeling?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I think the only way is by creating a unit group each time the dummy moves and checking if there is someone else in the group.

For the timing, change the thing called Follow Time or something like that.
I usually just set it to zero. Never tried to find what it actually does.
 
Level 3
Joined
Jul 14, 2007
Messages
34
Hmmm, I see what you mean, but what about stopping it when it hits trees and such, will they appear in unit groups under the right circumstances?
 
Level 9
Joined
Mar 25, 2005
Messages
252
Trees are destructables so they won't be included in unit groups. You have to use this for destructables: native EnumDestructablesInRect takes rect r, boolexpr filter, code actionFunc returns nothing.
Don't know if or what that is in GUI. Afaik you can't detect doodas.
 
Level 3
Joined
Jul 14, 2007
Messages
34
Hmm... so I'd have to perform two checks periodically? That seems like it could lag very quickly... anyone have an example I could dissect and look at? The missiles in the map "Battle Mages" are kinda the type of thing I'm looking for.
 
Status
Not open for further replies.
Top