Page 2 of 2

Re: Minimum distance possible for artillery pieces?

Posted: 30 Oct 2008, 13:52
by FLOZi
Well perhaps - but there was no tag to control it. :P

Re: Minimum distance possible for artillery pieces?

Posted: 30 Oct 2008, 20:54
by Evil4Zerggin
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.
I thought AimWeaponX was called every slow update regardless of reload time?

Re: Minimum distance possible for artillery pieces?

Posted: 31 Oct 2008, 21:26
by yuritch
I'm not really sure, such tricks usually work for my arty units (not for min range checking though), but those have long reload times. Haven't tried with fast-reload weapons.