OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: THobson on 24 Feb 2005, 10:42:12
-
I have a situation where I need to be able to determine the remaining seating capacity of a vehicle the player is sitting in. But the player could be in any vehicle (or none). Rather that check for all the possible vehicles I would like a way of doing this generically. I have looked through the config files and found that vehicles have a variable:
transportSoldier
Is there a way I can acces this variable for a specific vehicle from a script? Something like:
(vehicle player).transportSoldier
or
transportSoldier vehicle player
or some such?
-
I would be very interested to hear if this is the case, for if it is, thisis the first crossover of variables from .cpp to .sqs/f that I've heard of. I suspect that this is not possible, however.
-
I have tried this, I tried using something similar to count units in vehicle Homies_car and other things however had no such luck.
-
Not possible, unless you wanna buy VBS1 (which has that function). I would suggest creating game logics, then moving them into the vehicle's cargo. See how many you can move in this way, then just count them up and add the current number of units in cargo.
-
There's a pity. Thanks for the suggestion of game logics. At least I don't have to check for all possible vehicles in the script.