Basically I want a better version of the trigger above that will allow me to put any carrier in the range, instead of just a specific one.
It would allow me to remove the carrier from the map and have it spawn later with a working kill trigger.
None.
Don't do this in triggers, do this in the data editor. You need a behaviour on the carrier which has a search effect, search effect causes a kill effect. If you need a better explanation on how to do it just ask.
None.
He needs a better explanation, he is new to the editor as he already told me.
Please report errors in the Staredit.Network forum.
Ok I have attached an example map which does what you asked.
Every unit you want to have this happen to will need the behaviour KillUnits applied to it. You can set that in the unit properties for that unit in the data editor or through triggers, I have applied it to carriers through the data editor.
The KillUnits behaviour causes a periodic effect (SearchKill) which is a Search Area effect. This effect will search for units in a specified radius around the unit and cause whatever effect you want. For our purposes it is the KillSelf effect which kills the unit the behaviour is applied to.
The search area effect has filters which include/exclude types of units or hostility status from the search. I have excluded self and included cloaked but you may want it so only hostile units will trip the effect.
I am not that great at explaining things so ask if you are having trouble with anything.
Attachments:
None.
Ok I have attached an example map which does what you asked.
Every unit you want to have this happen to will need the behaviour KillUnits applied to it. You can set that in the unit properties for that unit in the data editor or through triggers, I have applied it to carriers through the data editor.
The KillUnits behaviour causes a periodic effect (SearchKill) which is a Search Area effect. This effect will search for units in a specified radius around the unit and cause whatever effect you want. For our purposes it is the KillSelf effect which kills the unit the behaviour is applied to.
The search area effect has filters which include/exclude types of units or hostility status from the search. I have excluded self and included cloaked but you may want it so only hostile units will trip the effect.
I am not that great at explaining things so ask if you are having trouble with anything.
Thank you soo much, works brilliantly.
None.