Hey guys,
Currently I'm checking for a collision between units by checking for units within range.
I'm making a unit group of all the possible units that could be within range and checking the distance.
For as many units as I have this doesn't work very efficiently.
Is there an event that can detect unit collisions or something like it?
Or maybe an action that can grab all the units within range?
All help appreciated!
I'm making a unit group of all the possible units that could be within range and checking the distance.
How exactly do you do that? The easiest way would be to create a circle region with the position of the source unit as center point and the desired distance as a radius and pick all units within this radius. If you just check for circular distance, you won't need any additional distance checks after this.
Depending on application, you could also move the distance check to data by using a periodic search effect or an autocast ability to execute an effect, which you could reference via trigger again, if needed.
Hey guys,
Currently I'm checking for a collision between units by checking for units within range.
I'm making a unit group of all the possible units that could be within range and checking the distance.
For as many units as I have this doesn't work very efficiently.
Is there an event that can detect unit collisions or something like it?
Or maybe an action that can grab all the units within range?
All help appreciated!
How exactly do you do that? The easiest way would be to create a circle region with the position of the source unit as center point and the desired distance as a radius and pick all units within this radius. If you just check for circular distance, you won't need any additional distance checks after this.
Depending on application, you could also move the distance check to data by using a periodic search effect or an autocast ability to execute an effect, which you could reference via trigger again, if needed.
Just the way the game is set up I know which units could be or not. No fancy triggering haha.
But could you go over how to make this circle region? And then so on?