• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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