Improve Turret Ingame API
The idea is simple and straightforward. Since the Raycast update, the PBs cannot acquire an IMyEntity reference anywhere anymore. But giving targets to turrets still require this (unless you want to go on full-manual control and input azimuth and elevation).
Developers could easily implement several functions which accept a MyDetectedEntityInfo struct, check it for validity, and then internally resolve it into an IMyEntity reference and set a turret's target.
It is very easy, it only requires to properly check the passed struct.
— Check if the EntityID points to a valid entity
— Check if the struct is not older than 2-3 seconds
— Check if the entity is within the turret's firing range.
They could also implement a property in IngameAPI which returns a fresh MyDetectedEntityInfo if a turret is firing at something.
shared this idea 01/08/17 19:47