- Joined
- Aug 21, 2005
- Messages
- 3,699
I've got a problem...
so I've made this trigger:
Events:
Unit - A unit Finishes casting an ability
Conditions:
(Ability being cast) Equal to Last man Standing
Actions:
Game - Display to (All players) the text: Trigger works
Unit Group - Pick every unit in (Units within 600.00 of (Position of (Casting unit)) matching ((Owner of (Picked unit)) Equal to (Owner of (Casting unit)))) and do (Unit Group - Add (Picked unit) to LMSUnits[(Player number of (Owner of (Casting unit)))])
Unit Group - Pick every unit in (Units within 600.00 of (Position of (Casting unit)) matching (((Owner of (Picked unit)) is an ally of (Owner of (Casting unit))) Equal to True)) and do (Unit Group - Add (Picked unit) to LMSUnits[(Player number of (Owner of (Casting unit)))])
Unit Group - Pick every unit in LMSUnits[(Player number of (Owner of (Casting unit)))] and do (Unit - Kill (Picked unit))
When testing, the text message shows up, so there's nothing wrong with the events/conditions.
Here's what I want: whenever the ability is cast, you must pick all units within 600 of the casting unit and check if this unit belongs to you or an ally.
then, these units must die (well that's not what should happen, but at least it's a good way to see if the trigger works).
been staring at this trigger for almost an hour now and I can't see what I'm doing wrong... maybe it's just me cause I'm not good at triggering, but whatever...
so I've made this trigger:
Events:
Unit - A unit Finishes casting an ability
Conditions:
(Ability being cast) Equal to Last man Standing
Actions:
Game - Display to (All players) the text: Trigger works
Unit Group - Pick every unit in (Units within 600.00 of (Position of (Casting unit)) matching ((Owner of (Picked unit)) Equal to (Owner of (Casting unit)))) and do (Unit Group - Add (Picked unit) to LMSUnits[(Player number of (Owner of (Casting unit)))])
Unit Group - Pick every unit in (Units within 600.00 of (Position of (Casting unit)) matching (((Owner of (Picked unit)) is an ally of (Owner of (Casting unit))) Equal to True)) and do (Unit Group - Add (Picked unit) to LMSUnits[(Player number of (Owner of (Casting unit)))])
Unit Group - Pick every unit in LMSUnits[(Player number of (Owner of (Casting unit)))] and do (Unit - Kill (Picked unit))
When testing, the text message shows up, so there's nothing wrong with the events/conditions.
Here's what I want: whenever the ability is cast, you must pick all units within 600 of the casting unit and check if this unit belongs to you or an ally.
then, these units must die (well that's not what should happen, but at least it's a good way to see if the trigger works).
been staring at this trigger for almost an hour now and I can't see what I'm doing wrong... maybe it's just me cause I'm not good at triggering, but whatever...