Jump to content

digoblin

Member
  • Content Count

    2
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About digoblin

  • Rank
    Newbie
  1. digoblin

    [HELP] Script for exchange air

    Ok for the filling i would do something like this GiveAir.sqf: private ["_me","_oxygen"]; _me = _this select 1; _oxygen = getOxygenRemaining _me; if (_oxygen<= 0.2) then { _me setOxygenRemaining 1; }; if(_oxygen > 0.8) then { hint "Your oxygen tank is full!"; }; now im not sure if it is totally right, but its a start i guess, good luck
  2. digoblin

    [HELP] Script for exchange air

    Hello, i'm new to scripting also, but from what i've tried so far and understood is that the addAction command call the script with 4 arguments being the first the target (target: Object - the object which the action is assigned to) the second the caller (caller: Object - the unit that activated the action) the third the ID (ID: Integer - ID of the activated action) and the forth aditional parameters for your script (arguments: Anything - arguments given to the script if you are using the extended syntax). So this being said when you do the _this select 2 you are selecting the ID, probably not the thing you need. So you probably dont need the "this addAction["Give Air","GiveAir.sqf",[this],0];" if you want to get the caller just do "_this select 1" So suming up what i tried to say, when you use the addAction method what it does is passing to your script the arguments in something like this ["the target","the caller","ID","additional arguments you want for your script"] Hope it is'nt too confusing :p
×