The ship is spawned close to the player (for testing purposes). It goes straight from GLOBAL to WAIT_FOR_PLAYER1 where it sends it's message straight away (being at the edge of the radar) and moves on to HEAD_FOR_CHECK_POINT_1 goes to the waypoint where it changes AI state to WAIT_FOR_PLAYER2, stops and waits for the player to get really close, before sending it's message (here for test purposes) and starting it's engines up again.
Why does it find the player at the edge of the radar in the first wait state but needs him to be very close in the second when the range is set to the same value in those two states?
300 billboards in Your Ad Here!
Astromines and more in Commies. AVAILABLE HERE along with other Oolite eXpansion Packs.
Noticed this with minesweepers. When spawned by the beacon for testing, they knock out mines (by doing a scanforNearestShipwithRole: EQ_Q_MINE and then a scriptactionontarget) within 60 Km like there meant to with a scanner range of 60 km. However when I put them near a base, so they have been spawned for some time when thr player arrives, they don't react to a mine until within about 5km. Turned out ok, as I just put fields of the sweepers so the blind spots overlapped (and a cleaver player can find a blind spot!). Not sure why though. but think it has somthing to do with the scanforNearestShipWithRole bit.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
Ok. I guess we will have to test when using this method to see how it reacts in different situations. It's clearly not meters all the time, since it manages to move on from WAIT_FOR_PLAYER1 already when it's at the edge of the radar.
300 billboards in Your Ad Here!
Astromines and more in Commies. AVAILABLE HERE along with other Oolite eXpansion Packs.