Jump to content
  • 0

self actions help


Asian Kid

Question

Need this skin to have this action
Its an AI unit 
Skin is Graves_Light     added the unit through the server pbo

_unit_224 = objNull;
if (true) then
{
  _this = createAgent ["Graves_Light", [7685.6807, 1445.8789, 0.42305249], [], 0, "CAN_COLLIDE"];
  _unit_223 = _this;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;  ";
  _this setUnitAbility 0.60000002;
_this allowDammage fals

 
what is wrong
 

_hascode = _cursorTarget isKindOf "Graves_Light";
if (_hascode && _canDo) then {
    if (s_player_code < 0) then {
	    Cooldown = 0;
        s_player_code = player addAction ["Ask: Whats the code?", "bunker\ask.sqf",_cursorTarget, 1, true, true, "", ""];
    }
} else {
    player removeAction s_player_code;
    s_player_code = -1;
};
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

To my knowledge, all it does is search for the skin right now. So you'd be better off doing something like istypeOf.
Or like what Sandbird posted here:



Well you might want to do

_traderguy = "Graves_Light";
_traderguy = _this select 0;

or

unitInfoType = "UnitInfoSoldier";
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...