14 Object targetObject = target.GetObject();
16 string test = player.GetDisplayName();
17 string test2 = item.GetType();
18 string test3 = targetObject.GetDisplayName();
20 if ( player && targetObject && item )
22 int componentIndex = target.GetComponentIndex();
23 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_1_1") )
25 Print(
"Predni leve" );
30 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_1_2") )
32 Print(
"zadni leve" );
37 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_1_3") )
39 Print(
"prostredni leve" );
44 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_1_4") )
46 Print(
"druhe predni leve" );
51 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_2_1") )
53 Print(
"Predni prave" );
58 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_2_2") )
60 Print(
"zadni prave" );
65 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_2_3") )
67 Print(
"prostredni prave" );
72 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_2_4") )
74 Print(
"druhe predni prave" );
87 int slot_index = action_data.
m_MainItem.GetInventory().GetSlotId(0);
96 int slot_index = action_data.
m_MainItem.GetInventory().GetSlotId(0);
AttachActionData ActionData ActionAttach()
class ActionTargets ActionTarget
override void OnExecuteServer(ActionData action_data)
override void OnExecuteClient(ActionData action_data)
void ActionAttachWheels()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
ref ActionTarget m_Target
Super root of all classes in Enforce script.
override bool LocalTakeEntityAsAttachmentEx(notnull EntityAI item, int slot)
override bool LocalTakeEntityAsAttachment(notnull EntityAI item)
proto void Print(void var)
Prints content of variable to console/log.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.