Page MenuHomeFeedback Tracker

Vehicle Service EH
New, NormalPublic


We currently have no way to detect when a vehicles state is being changed by built in services: ammo/fuel/repair

For example, when your vehicle gets close to a vehicle with fuel cargo, your vehicle will begin to refuel automatically.

Applies also to ammo and repair.

Applies also for AI.

Would be useful to have a method of detecting this state change, (and maybe even overriding/blocking it, for cases where we script our own rearms)

<vehicle> addEventHandler [
		params [
			'_vehicle',				// the vehicle being serviced
			'_serviceEntity',		// the entity giving service (fuel pump, repair truck, etc)
			'_type',				// 0 - repair, 1 - fuel, 2 - ammo
			'_oldState',			// prior value (damage _vehicle),(fuel vehicle),(weapon ammo state)
			'_newState'				// new value (damage _vehicle),(fuel vehicle),(weapon ammo state)
			'_serviceEntityOld',	       // BEFORE: "getRepairCargo" "getFuelCargo" "getAmmoCargo"
			'_serviceEntityNew'		// AFTER: "getRepairCargo" "getFuelCargo" "getAmmoCargo"
		false						// return TRUE to block state change?


Operating System
Windows 10 x64
Additional Information

The closest we can get to detection at the moment is when there is a corresponding action in the action menu, or monitoring the vehicle state.

I imagine this acting like an Analog event, where it fires repeatedly as the vehicles state changes (services dont apply 100% instantly)

relevant commands:

Event Timeline

MDCCLXXVI created this task.Fri, Sep 9, 9:11 AM
MDCCLXXVI renamed this task from Feature to Vehicle Service EH.
MDCCLXXVI updated the task description. (Show Details)
MDCCLXXVI edited Additional Information. (Show Details)Fri, Sep 9, 9:14 AM
MDCCLXXVI edited Additional Information. (Show Details)
MDCCLXXVI updated the task description. (Show Details)Fri, Sep 9, 9:16 AM