Quote:
Originally Posted by Das Attorney
Thanks for the hard work and research on these scripts. Some really awesomesauce going on in this thread.
I was wondering if someone could help me though. I'm using naryv's script to dispatch ambulances etc in a MP dogfight. There's also AI planes that periodically spawn and then land. The problem is that everytime an AI plane lands, fire trucks etc will spawn and eventually lag the game out.
Is there a way of limiting the spawn to just players?
I used to do scripting for Arma 2 (sqf) and the following would be appropriate to filter out AI:
PHP Code:
if (_x == player) then
{
// code
};
I'm not used to C# yet and don't know the syntax well at this point. How could I filter out the AI so firetrucks etc only spawn and deploy for human controlled planes?
I've looked in the examples, but I can't 'get it' yet. I know you're busy guys so even a basic example/link would get me started.
Thanks
|
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)