30 int componentIndex = target.GetComponentIndex();
38 nextSeatIdx = trans.CrewPositionIndex( componentIndex );
40 if ( nextSeatIdx < 0 )
43 Human crew = trans.CrewMember( nextSeatIdx );
47 if ( !trans.CanReachSeatFromSeat( trans.CrewMemberIndex( player ), nextSeatIdx ) )
55 super.OnStart(action_data);
60 if (
Class.
CastTo(trans, action_data.m_Target.GetObject()) )
62 int nextSeat = trans.CrewPositionIndex( action_data.m_Target.GetComponentIndex() );
63 int seat = trans.GetSeatAnimationType( nextSeat );
69 action_data.m_Player.OnVehicleSwitchSeat( nextSeat );
81 if( !hcv || !action_data.m_Player.GetCommand_Vehicle().IsSwitchSeat() )
96 bool accepted =
false;
97 int currSeat = trans.CrewMemberIndex(action_data.m_Player);
98 int nextSeat = trans.CrewPositionIndex( action_data.m_Target.GetComponentIndex() );
103 il.
SetVehicle(transport, action_data.m_Player, nextSeat);
106 if (
GetGame().AddInventoryJunctureEx(action_data.m_Player, action_data.m_Player, il,
true, 10000))
109 action_data.m_ReservedInventoryLocations.Insert(il);
114 il.
SetVehicle(transport, action_data.m_Player, currSeat);
116 if (
GetGame().AddInventoryJunctureEx(action_data.m_Player, action_data.m_Player, il,
true, 10000))
118 action_data.m_ReservedInventoryLocations.Insert(il);
class ActionTargets ActionTarget
proto static native void End()
Finalizes the testing process.
void ClearActionJuncture(ActionData action_data)
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
override bool AddActionJuncture(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool CanBeUsedInVehicle()
override void CreateConditionComponents()
override void OnUpdate(ActionData action_data)
override void OnStart(ActionData action_data)
Super root of all classes in Enforce script.
proto native void SwitchSeat(int pTransportPositionIndex, int pVehicleSeat)
proto native void SetVehicle(notnull EntityAI parent, EntityAI e, int idx)
Base native class for all motorized wheeled vehicles.
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.