LuaEntity.get_target() + set target options
Posted: Tue Oct 18, 2016 8:34 pm
Please add for turret, unit, player, vehicle.
LuaEntity.get_target() → {entity=LuaEntity, position=Position}
If no target or not a turret, unit, player, vehicle the return value would be nil.
If targeting ground (shotgun/cannon) it would just be: {entity=nil, position=Position}
Also, LuaEntity.set_target_entity(entity = LuaEntity) would be useful for turrets and units.
And LuaEntity.fire_at_location(position = Position, fire_repeatedly = Bool) would be especially useful for anything with an AOE related, like shotgun tanks, grenade turrets, artillery, etc.
And if you're feeling particularly awesome: LuaEntity.ticks_since_last_attack:: uint [R] would also be very helpful.
LuaEntity.get_target() → {entity=LuaEntity, position=Position}
If no target or not a turret, unit, player, vehicle the return value would be nil.
If targeting ground (shotgun/cannon) it would just be: {entity=nil, position=Position}
Also, LuaEntity.set_target_entity(entity = LuaEntity) would be useful for turrets and units.
And LuaEntity.fire_at_location(position = Position, fire_repeatedly = Bool) would be especially useful for anything with an AOE related, like shotgun tanks, grenade turrets, artillery, etc.
And if you're feeling particularly awesome: LuaEntity.ticks_since_last_attack:: uint [R] would also be very helpful.