Home   Help Search Login Register  

Author Topic: Accessing config variables  (Read 657 times)

0 Members and 1 Guest are viewing this topic.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Accessing config variables
« 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?

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:Accessing config variables
« Reply #1 on: 24 Feb 2005, 11:52:00 »
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.

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Accessing config variables
« Reply #2 on: 24 Feb 2005, 16:48:58 »
I have tried this, I tried using something similar to count units in vehicle Homies_car and other things however had no such luck.
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Accessing config variables
« Reply #3 on: 24 Feb 2005, 21:38:20 »
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.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Accessing config variables
« Reply #4 on: 25 Feb 2005, 00:41:34 »
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.