Page MenuHomeFeedback Tracker

Vehicle in Vehicle events
Closed, ResolvedPublic

Description

Currently the ViV system lacks events for loading/unloading which would be useful for scripted systems, eg. https://github.com/acemod/ACE3/pull/7984

I think expanding the system with events would greatly improve it's usability for modders.

Proposal:
Events added to transport vehicle:

_vehicle addEventHandler ["CargoLoaded", {
	params ["_vehicle", "_cargo"];
}];
_vehicle addEventHandler ["CargoUnloaded", {
	params ["_vehicle", "_cargo"];
}];

// or as an alternative
_vehicle addEventHandler ["CargoState", {
	params ["_vehicle", "_cargo", "_state"];
}];

Events added to vehicles/objects that are being transported:

_vehicle addEventHandler ["LoadedIntoCargo", {
	params ["_vehicle", "_transport"];
}];
_vehicle addEventHandler ["UnloadedFromCargo", {
	params ["_vehicle", "_transport"];
}];

// or as an alternative
_vehicle addEventHandler ["TransportState", {
	params ["_vehicle", "_transport", "_state"];
}];

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General

Event Timeline

dedmen added a subscriber: dedmen.Aug 11 2021, 9:26 AM

Only CargoLoaded/CargoUnloaded.

Fires for both vehicles
parentVehicle addEventhandler... params ["_parentVehicle", "_cargoVehicle"]
cargoVehicle addEventhandler... params ["_parentVehicle", "_cargoVehicle"]

Sit on quad and load in flatbed

11:02:37 ["parentloaded",[1e3274ce040# 5: truck_01_flatbed_f.p3d,B Alpha 1-1:1 (dedmen)]]
11:02:37 ["childloaded",[1e3274ce040# 5: truck_01_flatbed_f.p3d,B Alpha 1-1:1 (dedmen)]]

Unload

11:02:39 ["parentunloaded",[1e3274ce040# 5: truck_01_flatbed_f.p3d,B Alpha 1-1:1 (dedmen)]]
11:02:39 ["childunloaded",[1e3274ce040# 5: truck_01_flatbed_f.p3d,B Alpha 1-1:1 (dedmen)]]

dedmen claimed this task.Aug 11 2021, 11:04 AM
dedmen changed the task status from New to Feedback.
veteran29 closed this task as Resolved.Jun 11 2024, 4:02 PM