返信先: Arma3 スクリプト公開スレ

ホーム フォーラム TRI Gaming フォーラム Arma3 スクリプト公開スレ 返信先: Arma3 スクリプト公開スレ

#126992
trico
キーマスター

nice script, sixtyfour


ACE対応、AIユニットをドラッグできるようにするスクリプト (by Yomo)

addDragging.sqf

//Carry
_action1 = ["carry", "Carry", "", {[(_this select 1), (_this select 0)] call ace_dragging_fnc_startCarry; (_this select 1) sideChat "Carrying";}, {(alive (_this select 0)) and (vehicle (_this select 0) == (_this select 0)) and ((_this select 0) getVariable ['isDragging', False])}] call ace_interact_menu_fnc_createAction;
["b_soldier_unarmed_f", 0, ["ACE_MainActions"], _action1] call ace_interact_menu_fnc_addActionToClass;

//Drag
_action2 = ["drag", "Drag", "", {[(_this select 1), (_this select 0)] call ace_dragging_fnc_startDrag; (_this select 1) sideChat "Dragging";}, {(alive (_this select 0)) and (vehicle (_this select 0) == (_this select 0)) and ((_this select 0) getVariable ['isDragging', False])}] call ace_interact_menu_fnc_createAction;
["b_soldier_unarmed_f", 0, ["ACE_MainActions"], _action2] call ace_interact_menu_fnc_addActionToClass;

//Load
_action3 = ["load", "Load", "\z\ace\addons\medical\UI\icons\medical_cross.paa", {[(_this select 1), (_this select 0)] call ace_common_fnc_loadPerson; (_this select 1) sideChat "Load Person";}, {(alive (_this select 0)) and (vehicle (_this select 0) == (_this select 0)) and ((_this select 0) getVariable ['isDragging', False])}] call ace_interact_menu_fnc_createAction;
["b_soldier_unarmed_f", 0, ["ACE_MainActions"], _action3] call ace_interact_menu_fnc_addActionToClass;

//UnLoad
_action4 = ["unload", "Unload", "\z\ace\addons\medical\UI\icons\medical_cross.paa", {[[(_this select 0)], "ace_common_fnc_unloadPersonLocal", (_this select 0), false] call ace_common_fnc_execRemoteFnc; (_this select 1) sideChat "Unload Person";}, {(alive (_this select 0)) and (vehicle (_this select 0) != (_this select 0)) and ((_this select 0) getVariable ['isDragging', False])}] call ace_interact_menu_fnc_createAction;
["b_soldier_unarmed_f", 0, ["ACE_MainActions"], _action4] call ace_interact_menu_fnc_addActionToClass;

init.sqfに以下を書く

execVM "scripts\addDragging.sqf";

人質ユニット (b_soldier_unarmed_f) に以下を書く

this setVariable ["isDragging", true, true];