I am kind of pulling my hair out here so hoping someone can point me in the right direction..
I have created a bus with two AI troops, all in the same group, I load the units as driver and cargo and send them on their merry way around a set of waypoints, all good..
I want to react to the bus being hijacked so am adding an eventHandler to the driver using:
that's the simple version, I have been trying to pass the bus object and the second (passenger) unit so I can command the passenger to get in the drivers seat.
So I tried
but am getting an array, I want the actual object, is this possible. Am pretty sure have done it with addAction but every different thing seems to work differently with this coding..
I have created a bus with two AI troops, all in the same group, I load the units as driver and cargo and send them on their merry way around a set of waypoints, all good..
I want to react to the bus being hijacked so am adding an eventHandler to the driver using:
Code:
_driverKilled = busUnit addEventHandler ["killed", {_this execVM "busroute\driverKilled.sqf"}];
that's the simple version, I have been trying to pass the bus object and the second (passenger) unit so I can command the passenger to get in the drivers seat.
So I tried
Code:
_driverKilled = busUnit addEventHandler ["killed", {[_this,[_bus],[_driversMate]] execVM "busroute\driverKilled.sqf"}];