Trigger Help

Volte

Member!
Joined
Jul 4, 2003
Messages
23
Reaction score
0
Website
Visit site
Hey. if you are good with triggers, could you please help me correct this one? for some reason it doesnt seem to work, i just cant figure it out:

Unit Group - Pick every unit in (Units owned by Neutral Hostile matching ((Life of (Picked unit)) Less than or equal to ((Max life of (Picked unit)) x 0.60))) and do (Unit - Order (Picked unit) to Attack (Random unit from (Units within 500.00 of (Position of (Picked unit)) matching ((Owner of (Target unit of issued order)) Equal to Neutral Passive))))

Also, I've always wondered what the scale for "within" was. what are they using to judge distance? 500 what?

Thanks a bunch.
 

answerson

Member!
Joined
Apr 3, 2004
Messages
32
Reaction score
0
Website
Visit site
first of all.. i dont see what your trying to do... explain it a little better please... i cant even guess.. i mean why when he has less life then a picked unit.. lol i'm confused
 

Volte

Member!
Joined
Jul 4, 2003
Messages
23
Reaction score
0
Website
Visit site
Ok. No Problem. My Bad. let me break it down.

Unit Group - Pick every unit in (Units owned by Neutral Hostile matching ((Life of (Picked unit)) Less than or equal to ((Max life of (Picked unit)) x 0.60)))

Select Every Unit that belongs to hostile, and then weed out the ones with health greater than 60% of their maximum health. So say there are a few hostile creatures, all with 100 health, but 4 of them go to 60, 3 go to 80, and 3 go to 20... it would end up selecting the 3 60's and the 3 20's, resulting in six creatures selected.

...and do (Unit - Order (Picked unit) to Attack (Random unit from (Units within 500.00 of (Position of (Picked unit)) matching ((Owner of (Target unit of issued order)) Equal to Neutral Passive))))

Ok... so we've got all the hostile creatures with less than 60% of their health. Now, make them all go off and attack a Neutral Passive creature within 500 (whatever's) of them selves.

Thanks so much for responding.
 

SephirothX89

Member!
Joined
May 19, 2003
Messages
1,074
Reaction score
0
Location
Azeroth
Website
Visit site
for your "500 what?" question. its range, like archers have 600 range... so 500 range would be everything in a circle around the unit with a 500 range diameter.
 

Garthrs

Member!
Joined
Aug 3, 2003
Messages
130
Reaction score
0
Location
Usually buried at work
Website
Visit site
Originally posted by Volte
Ok. No Problem. My Bad. let me break it down.

Unit Group - Pick every unit in (Units owned by Neutral Hostile matching ((Life of (Picked unit)) Less than or equal to ((Max life of (Picked unit)) x 0.60)))

Select Every Unit that belongs to hostile, and then weed out the ones with health greater than 60% of their maximum health. So say there are a few hostile creatures, all with 100 health, but 4 of them go to 60, 3 go to 80, and 3 go to 20... it would end up selecting the 3 60's and the 3 20's, resulting in six creatures selected.

...and do (Unit - Order (Picked unit) to Attack (Random unit from (Units within 500.00 of (Position of (Picked unit)) matching ((Owner of (Target unit of issued order)) Equal to Neutral Passive))))

Ok... so we've got all the hostile creatures with less than 60% of their health. Now, make them all go off and attack a Neutral Passive creature within 500 (whatever's) of them selves.

Thanks so much for responding.
First, you can not pick every unit in a vague group

Pick every unit with life equal to picked unit.... which equals zero.. Try reworking with an If then Esle trigger.

Try :
Pick every unit belonging to Nuetral Hostile and do Actions
If
Picked unit's life equals yadda yadda (60%)
Then
Charge rent -- Unit - Order (Picked unit) to Attack (Random unit from (Units owned by Neutral Passive))
Else
Kick their arse out! (Do Nothing)

Get it?
 

New threads

Top