This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
How come
Variable - Set Attacking Unit Member = (Returns the unit who last attacked the specified unit Zealot Prisoner [48.91, 246.80])
Does not set the specified variable to the last unit who attacked the specified zealot prisoner.
How can I fix this, and alternatively how can I make an action(s) that does this.
You'd probably have to be more specific. A screenshot of the trigger might be helpful.
I added picture of trigger that attempts to set the variable to attacking unit.
In another trigger later I try and access that variable in and if statement and it fails because of the variable not being the zergling that attacked.
Just use Attacking Unit instead of that lengthy and probably erroneous method involving finding the last attacker.
Quote from Nashadun: GoJust use Attacking Unit instead of that lengthy and probably erroneous method involving finding the last attacker.
Don't forget to use the Condition (Unit type of Attacked Unit == Whatever) or you'll be coming back for more help. :P
Many thanks guys, worked like a charm.
@urashimakt: Go
Well, the trigger doesn't use "Any unit is attacked", so events will only be generated for the appropriate unit.
Quote from Nashadun: Go@urashimakt: Go Well, the trigger doesn't use "Any unit is attacked", so events will only be generated for the appropriate unit.
Didn't notice the event, I suppose.
How come
Variable - Set Attacking Unit Member = (Returns the unit who last attacked the specified unit Zealot Prisoner [48.91, 246.80])
Does not set the specified variable to the last unit who attacked the specified zealot prisoner.
How can I fix this, and alternatively how can I make an action(s) that does this.
You'd probably have to be more specific. A screenshot of the trigger might be helpful.
I added picture of trigger that attempts to set the variable to attacking unit.
In another trigger later I try and access that variable in and if statement and it fails because of the variable not being the zergling that attacked.
Just use Attacking Unit instead of that lengthy and probably erroneous method involving finding the last attacker.
Don't forget to use the Condition (Unit type of Attacked Unit == Whatever) or you'll be coming back for more help. :P
Many thanks guys, worked like a charm.
@urashimakt: Go
Well, the trigger doesn't use "Any unit is attacked", so events will only be generated for the appropriate unit.
Didn't notice the event, I suppose.