• 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.

What's my fault :|?

Status
Not open for further replies.
Level 1
Joined
Aug 22, 2005
Messages
3
Hi, im new at this forum but not with making spells, but i must have missed something here but I just cant find my mistake in this trigger.

Im making a spell (fresh meat) that would make every ally in 800 range of a target enemy unit attack him cause they think he is the one and only enemy for a few seconds.

i've made a spell based on the inner fire spell so the enemy gets a defense bonus. and this is the trigger.
event: Unit-a Unit starts the effect of an ability
condition: (ability being cast) equal to "my spell"
actions: -Set FreshMeatTar = (target unit of abulity being cast)
-Unit Group - Pick every unit in(Units within 800 of(Position of FreshMeatTar)Matching(((Picked unit)belongs to an enemy of(Owner of FreshMeatTar))equal to false))and do(actions)
loop actions:
-Unit - change ownership of FreshMeatTar To Neatral Victim and retain color.
-Unit - Order (picked Unit} to attack FreshMeatTar
-Wait 6 seconds
-Unit - order (picked unit) to Stop
-Unit - Change Ownership of FreshMeatTar to (previous owner and retain color.

I know there must be something wrong with the Set FreshMeatTar or the Pick every unit bla bla because I made a create unit action before and after and before he made a unit and after it didnt.

plz help
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
The mistake is obvious. You referr to the (Picked Unit) in the Matching conditions as (Matching Unit).

-Unit Group - Pick every unit in(Units within 800 of(Position of FreshMeatTar)Matching(((Matching Unit)belongs to an enemy of(Owner of FreshMeatTar))equal to false)

This is the correct code!

~Daelin
 
Level 1
Joined
Aug 22, 2005
Messages
3
im sorry for the late reaction but i tried much different things but i dont get why they dont stop attacking the target. i tried to set the group who attack him in a variable and order them to stop or hold position or move to another point but nothing works. this must be another dumb mistake.
 
Status
Not open for further replies.
Top