Re: Minimum distance possible for artillery pieces?
Posted: 30 Oct 2008, 13:52
Well perhaps - but there was no tag to control it. 
Open Source Realtime Strategy Game Engine
https://springrts.licho.eu/phpbb/
I thought AimWeaponX was called every slow update regardless of reload time?yuritch wrote:If you want to check for minimum range, do it in the AimWeaponX script for the arty weapon, use get TARGET_ID to find out which unit it targets, and then use get UNIT_XZ on that unit and the firing unit to calculate the distance. That's probably best kept on long-reload weapons only as all those calls can in theory slow the game down if used on a fast reload spammable units.