View Single Post
  #17  
Old 09-15-2011, 11:01 PM
Das Attorney Das Attorney is offline
Approved Member
 
Join Date: May 2011
Posts: 142
Default

Quote:
Originally Posted by fearlessfrog View Post
On a quick peek, I think there may be a bug around line 212, i.e. this bit:

Code:
                        if (!CurTechCars.Contains(TmpCar))
                             CurTechCars.Add(TmpCar);
                        MissionLoading = false;
..in that it's adding new cars even if they exist as it doesn't find a match for the existing object.

Another way to do this would be an 'if (CurTechCars.count < MAX_CARS) in before the CurTechCars.Add(TmpCar)

Hopefully that's a few clues, as I'm away from a computer (typing this on a pad)
Thanks

I managed to modify the script to only work on player planes by adding a condition to ignore AI planes - using !isAiControlledPlane(aircraft)

It's working for player planes only now quite nicely.

I'd like to have a go at adding in some code to rearm/refuel/repair. Off the top of my head, it could probably work by automatically setting fuel etc to 1 when the relevant truck completes it's last waypoint. Or when it completes it's last waypoint, then it activates the Mission menu for the player to select the appropriate emergency service. I'm not sure if these solutions would be possible as I don't know many of the scripting commands.

How can you see the API? Do you have to run kegetys -dump command or is there a different way to look at the API (in the COD folder somewhere maybe)?

EDIT: I suspect it's in the maddox.dll....

Last edited by Das Attorney; 09-15-2011 at 11:31 PM.
Reply With Quote