DialogsThere are two types of interface, user actions and dialogs. User actions should be self-explanatory. Dialogs offer a few more options.
The first person perspective dialog, shows all the available cargo and transport within a 50m radius, along with any loaded cargo. Single click to select either transport or cargo from the lists. Double click or use the buttons, to load and unload cargo. Available cargo is automatically filtered according to the selected transport type, and it’s available capacity.
The overhead dialog allows you to position and rotate, as well as load and unload, cargo objects.
Description.ext
Example:
Functions And ScriptsIf you’re writing a mission or script to use the Cargo system, there are a couple of things you have to adhere to, when working with Cargo System addons. There are two commands which should be used instead of the original Arma commands; DeleteVehicle and RespawnVehicle. Instead of using those two commands you should call RKSL_DeleteVehicle and RKSL_RespawnVehicle. Both the RKSL functions take the same parameters as the Arma commands they replace, and eventually do the same thing. [Object] Call RKSL_DeleteVehicle [Object,Delay,Count] Call RKSL_RespawnVehicleBecause visible cargo proxies occupy infantry positions in a vehicle, we have also provided an alternative for the Crew command. So if you want to know how many infantry occupy a transport vehicle that may or may not, also contain cargo proxies. You should use the following: [Object] Call RKSL_Crew Example Missions & AI Scripts
RKSL_AddCargo To assign any unsupported Arma addon, as hidden cargo, use: [Object,Size] Call RKSL_AddCargo Optional parameter, delay in seconds when loading or unloading the cargo object: [Object,Size,Delay] Call RKSL_AddCargo * Don't call this command using SetVehicleInit, it will cause a CTD. All Cargo System functions are already MP compatible. RKSL_AddTransport To assign any unsupported Arma addon, as a transporter of hidden cargo, use: [Object,Capacity] Call RKSL_AddTransport * Don't call this command using SetVehicleInit, it will cause a CTD. All Cargo System functions are already MP compatible. RKSL_ActiveObj To check if an object is alive and exists, use: Cargo=[Object] Call RKSL_ActiveObj RKSL_CargoFree To check if both the cargo and transport are available and not currently locked by another load\unload request use: Cargo=[TransportObject,CargoObject] Call RKSL_CargoFree RKSL_GetTransCargo To return an array of a vehicle’s loaded cargo use: CargoList=[TransportObject] Call RKSL_GetTransCargo RKSL_TransCanLoad To check if the transport has room to load a specific cargo: CanLoad=[TransportObject,CargoObject] Call RKSL_TransCanLoad RKSL_CargoLoad To make a request to load a cargo object use the following: ScriptPointer=[CargoObject,TransportObject] spawn RKSL_CargoLoad * Don't call this command using SetVehicleInit, it will cause a CTD. All Cargo System functions are already MP compatible.
RKSL_CargoLoaded To check if a load request was successful, use: IsLoaded=[CargoObject,TransportObject] Call RKSL_CargoLoaded RKSL_CargoUnload To make a request to unload a cargo object use the following: ScriptPointer=[CargoObject,TransportObject] Spawn RKSL_CargoUnload * Don't call this command using SetVehicleInit, it will cause a CTD. All Cargo System functions are already MP compatible.
RKSL_CargoUnloaded To check if an unload request was successful, use: IsUnloaded=[CargoObject,TransportObject] Call RKSL_CargoUnloaded * Don't call this command using SetVehicleInit, it will cause a CTD. All Cargo System functions are already MP compatible. RKSL_NearestCargo To obtain a list of all the currently unloaded cargo, within a user defined radius use: ObjectArray=[Object or Position,Radius,CargoClass or ObjectType] Call RKSL_NearestCargo RKSL_RemoveCargoSystem Removes any cargo/transport properties from the specified vehicle or object. [Object] Call RKSL_RemoveCargoSystem * Don't call this command using SetVehicleInit, it will cause a CTD. All Cargo System functions are already MP compatible. RKSL_CargoRemove Removes any cargo properties from the specified vehicle or object. [Object] Call RKSL_CargoRemove * Don't call this command using SetVehicleInit, it will cause a CTD. All Cargo System functions are already MP compatible. RKSL_TransRemove Removes any transport properties from the specified vehicle or object. [Object] Call RKSL_TransRemove * Don't call this command using SetVehicleInit, it will cause a CTD. All Cargo System functions are already MP compatible. RKSL_SystemRemove Removes the specified object from all RKSL systems. [Object] Call RKSL_SystemRemove * Don't call this command using SetVehicleInit, it will cause a CTD. All Cargo System functions are already MP compatible. RKSL_TransSetCapacity Sets the capacity of an active transport. [Object,Capacity] Call RKSL_TransSetCapacity * Don't call this command using SetVehicleInit, it will cause a CTD. All Cargo System functions are already MP compatible. Event HandlersRKSL-System has been given an improved eventhandler routines. The following events have now be added to the Cargo System: CargoLoad Event is called before a cargo object has loaded. CargoLoaded Event is called after a cargo object has loaded. CargoUnLoad Event is called before a cargo object is unloaded. CargoUnLoaded Event is called after a cargo object is unloaded. TransportLoad Event is called before a transport unloads a single cargo object. TransportLoaded Event is called after a transport loads a single cargo object. TransportUnLoad Event is called before a transport unloads a single cargo object. TransportUnLoaded Event is called after a transport unloads a single cargo object. UsageMost of the events use a standard format and look quite similar to the BIS event handlers. For Cargo events you would add them like this:
The parameters passed to the script (in this case LoadingCargo.sqf) would look like this: LoadingCargo.sqf
For the Transport events you would use this:
The parameters passed to the script (in this case LoadingTransport.sqf) would look like this: LoadingTransport.sqf
To remove any of the above event handlers use the following:
While most of the events follow this format, there is one exception. When unloading from the 1st Person Dialog interface you have an extra parameter available. The parameter is in the form of an array pointer, that lets you override the position of the unloaded Cargo object. In that case the called script would look like this:
Now the Cargo will be positioned where the player is standing instead of the original random position normally picked when unloading from the 1st Person Dialog. |