Hallo, folgendes Problem: Mir wird ständig gesagt, dass die _arguments Variable nicht definiert ist, obwohl das humbug ist.
Code: fn_useElevator.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_useElevator.sqf
Author: Alex
Description:
Uses the elevator
*/
private ["_target", "_caller", "_actionId", "_arguments", "_newPosition"];
params ["_target", "_caller", "_actionId", "_arguments"];
_target = _this select 0;
_caller = _this select 1;
_arguments = (_this select 3) select 0;
_newPosition = [];
if (life_action_inUse) exitWith {};
if !(isNull objectParent player) exitWith {};
if (life_istazed) exitWith {};
if (life_isknocked) exitWith {};
switch (_arguments) do
{
case "kh1": {_newPosition = [8171.92,10052.9,52.609];};
case "kh2": {_newPosition = [8165.53,10039.9,2.47192];};
};
life_action_inUse = true;
titleText ["", "BLACK OUT", 0.3];
sleep 0.3;
_caller hideObjectGlobal true;
playSound "fahrstuhl";
sleep 5;
_caller setPos _newPosition;
_caller hideObjectGlobal false;
titleText ["", "BLACK IN", 0.3];
life_action_inUse = false;
Alles anzeigen
Init:
this addAction ["Aufzug benutzen",life_fnc_useElevator,kh1];