Home   Help Search Login Register  

Author Topic: Function Returns the crew capacity/available seating of any vehicle  (Read 1598 times)

0 Members and 1 Guest are viewing this topic.

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Here is a new function : crewCapacity.sqf that will return information on the seating capacity in any vehilce. It returns a 6 element array [driver, gunner, commander, cargo_capacity, cargo_available, total_available]. In the first 3 array elements the value will be either -1, 0 or 1. If the value is -1 the postition is invalid, if the value is 0 the position is valid but unavailable and if the value is 1 the position is valid and available. In the fourth array element the value can be -1, or any integer value >=1. If the value is -1 the vehicle has no valid cargo seating, if the value is 1 or greater, then that value indicates the cargo passenger capacity for the vehicle. The fith element will be the number of available cargo seats (seats that are unoccupied) and the sixth element indicates the total number of unoccupied seats in the vehicle.  The function has extensive instuctions. The attached demo also has a simple script that calls the function and displays the information returned by the function. Use your squad (when playing the demo) to change the occupancy of the various test vehicles so you can see how the function works when vehicles are full, partially full or empty.
« Last Edit: 25 Sep 2006, 00:18:14 by Raptorsaurus »

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
It appears that the attachment is for your AI LZ function, not the crew count function :P

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
OOps!! OK. correct file attached.