I have 200 critters moving around map that players' units must avoid to survive.
However I don't know how to alter critter data such that whenever player unit collides with critter it will die.
Is there a way for critter to behave same as lava in campaigns- touch it and you die? Is there easier way to achieve this effect?
It's pretty easy to do it with Data. Check my Ikari Warriors map to see how the "Tank Crush" is done... It basically does a lot of damage to any infantry unit coming close to the tank when it's moving.
You'll need a periodic effect (search area) to check if there is a unit close to your critter. When there is, it executes a damage effect. Create a behavior on your critter that will execute the periodic search effect, and when you play the critter will kill anything coming too close to him (including himself... heh). To prevent the critter to kill itself or other critters, you will need a validator in the search area effect that will exclude units of the same type as your critter.
I'm sorry to skip details on how to do that exactly, but if you need any help, search for topics in the forums about validators, search effects, and damage effects. You'll probably find all your answers in more detailed topics. That's how I learned to do my Tank Crush. :)
I have 200 critters moving around map that players' units must avoid to survive. However I don't know how to alter critter data such that whenever player unit collides with critter it will die. Is there a way for critter to behave same as lava in campaigns- touch it and you die? Is there easier way to achieve this effect?
@TwilightMarine: Go
It's pretty easy to do it with Data. Check my Ikari Warriors map to see how the "Tank Crush" is done... It basically does a lot of damage to any infantry unit coming close to the tank when it's moving.
You'll need a periodic effect (search area) to check if there is a unit close to your critter. When there is, it executes a damage effect. Create a behavior on your critter that will execute the periodic search effect, and when you play the critter will kill anything coming too close to him (including himself... heh). To prevent the critter to kill itself or other critters, you will need a validator in the search area effect that will exclude units of the same type as your critter.
I'm sorry to skip details on how to do that exactly, but if you need any help, search for topics in the forums about validators, search effects, and damage effects. You'll probably find all your answers in more detailed topics. That's how I learned to do my Tank Crush. :)
@ZealNaga: Go
http://forums.sc2mapster.com/development/data/11681-unit-collision-kills-enemy-units/?post=10
direct link to the post with an attached map of a tank that kills whatever it touches when it moves.