Turret behavior - range

Discussion and feedback on Construct 2

Post » Fri Mar 04, 2016 10:36 am

With reference to this subject posted as bug: https://www.scirra.com/forum/turret-behavior-range_t117262

The range is measured to the origin of an object. This can make it impractical to use in eg. a TD game.

As pointed out in thread above, one solution is to put a number of invisible objects in a container with the target sprite, and then set the position to the target's imagepoints, and pin them. Then add the pinned sprites as turret targets. However this can cause the turret to target the corners of the target (if the target has a square shape), which is also impractical. Furthermore, you have to pin 8 objects to each different target, to achieve good measurement, if the target is changing angle, which is also often the case in TD games.

I don't work on a TD game currently, but uses the turret bahavior for something similar, and my targets are changing their size too. This means that the pin behavior is partly useless, as you cant pin to imagepoints, and have to set the position of each of the pinned objects to the imagepoints, everytime the size of the target changes, making it even more impractical.

Imo a nice solution would be to let the user set an attribute for the turret behavior; range to specific imagepoint (origin as default) or range to closest imagepoint. Alternatively range to collision box points could be used. I don't expect @ashley to make this change in C2, but maybe think about it, if a similar behavior is used in C3.
Posts: 78
Reputation: 2,524

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests