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

Please help with making this spell

Status
Not open for further replies.
Level 3
Joined
Jan 3, 2005
Messages
24
Hi, just wondering if anyone can help me with a spell called omni-slash, this ability has been made several times, but each time i find a new one i discover that it actually attacks your allies aswell as enemies, so i would like someone to hlep me fix the problem of it attacking allies.
 
Level 10
Joined
Apr 9, 2004
Messages
502
The problem is that the spells probably didn't specify that the targeted units were enemies of the caster. All you have to do is to add an if/then/else funtion to correct that and check for if the unit is invul/dead/alive/close enough/an enemy/a structure etc.

Use "Picked unit is alive equal to true (boolean)" "and" "owner of picked unit equal to random player from enemies of owner of [your casting unit]" and a bunch of "or" functions to check for all of the rest


Hope this helps you
 
Status
Not open for further replies.
Top