Code: Select all
ENTER = ("scanForNearestShipWithRole: shipwreck");
"TARGET_FOUND" = (setTargetToFoundTarget, setDestinationToTarget, "setSpeedFactorTo: 0.3", "setDesiredRangeTo: 350.0", performFlyToRangeFromDestination);
"NOTHING_FOUND" = ("setStateTo: WANDER");
"DESIRED_RANGE_ACHIEVED" = (becomeExplosion, "setStateTo: SCHOOL");
I know its picking up the "shipwreck" and will fly towards it correctly without the "DESIRED_RANGE_ACHIEVED" line.
I've also tried using the checkCourseToDestination method as used in other AIs but it seems the desired range achieved message is always received immediately, regardless of the actual range to destination. Having played around with every combination of methods I can think of I'm now kinda stumped