Hey I was wondering how to make it so that when, let's say my zergling, runs and gets in contact with a zealot (Not hitting or anything, just touching him), the zergling dies. How do I make that in triggers? Basically I have a trigger to make zealots appear at a certain region and at a certain time but I don't know to make it so when my zergling touches them the zergling dies. Help please!
I was thinking of using zergling gets to a distance of 1.0 of "-" but my zealot isnt an actual value because it's created through a trigger so I don't know what to do here :/
You could save the Zealot as an variable. In the same trigger that you create him you set your zealot variable to the last created unit, than you have another trigger where you make it so that whenever a unit enters within 1.0 of your zealot variable that you kill the triggering unit.
You can do this through the data editor. Create a behavior with a periodic effect that searches the area around the behavior-holder. This search area should apply an "kill" effect. Then you just need to add the behavior when the zealot is spawned. Let me cook up a demo.
I made a variable called Zealot and made him last created unit, then in my trigger where i start the obstacle I made it spawn a zealot and i set variable that makes him last created unit, then I made run the trigger where the event is, when zergling enters 1.0 of last created unit, action, zergling dies. But I doesn't work, I dunno what I did wrong here D:
That would be really appreciated Grogian thanks! :D
Lol thanks you two! I'm not used to the data editor that's why I wasn't responding, I can't figure out how to bring the 2 effects in the behavior lol -- *nub*
You only need one effect in the behavior, the "Search Area". The "Search" area has a field to set radii and what to do to units in that radii (the "Kill Effect").
Ohhh yess now I see I got it now thanks! XD, regardings the trigger way, is there a way to make the radius a bit smaller? because it kills the zergling just a tadddd too far from what I'd like :S
Hey I was wondering how to make it so that when, let's say my zergling, runs and gets in contact with a zealot (Not hitting or anything, just touching him), the zergling dies. How do I make that in triggers? Basically I have a trigger to make zealots appear at a certain region and at a certain time but I don't know to make it so when my zergling touches them the zergling dies. Help please!
I was thinking of using zergling gets to a distance of 1.0 of "
-" but my zealot isnt an actual value because it's created through a trigger so I don't know what to do here :/You could save the Zealot as an variable. In the same trigger that you create him you set your zealot variable to the last created unit, than you have another trigger where you make it so that whenever a unit enters within 1.0 of your zealot variable that you kill the triggering unit.
You can do this through the data editor. Create a behavior with a periodic effect that searches the area around the behavior-holder. This search area should apply an "kill" effect. Then you just need to add the behavior when the zealot is spawned. Let me cook up a demo.
done. Pew pew.
I made a variable called Zealot and made him last created unit, then in my trigger where i start the obstacle I made it spawn a zealot and i set variable that makes him last created unit, then I made run the trigger where the event is, when zergling enters 1.0 of last created unit, action, zergling dies. But I doesn't work, I dunno what I did wrong here D:
That would be really appreciated Grogian thanks! :D
Okay, attached the map to my previous post.
Here is a trigger way also.
Lol thanks you two! I'm not used to the data editor that's why I wasn't responding, I can't figure out how to bring the 2 effects in the behavior lol -- *nub*
Thanks Twin too!
@killablink: Go
You only need one effect in the behavior, the "Search Area". The "Search" area has a field to set radii and what to do to units in that radii (the "Kill Effect").
Ohhh yess now I see I got it now thanks! XD, regardings the trigger way, is there a way to make the radius a bit smaller? because it kills the zergling just a tadddd too far from what I'd like :S
Just change the radius of the circle in the map initialization trigger.
Ahhh, there we go, thanks a ton you two! :D