Jump to content

Schatten

Member
  • Content Count

    782
  • Joined

  • Last visited

  • Medals

Posts posted by Schatten


  1. 13 hours ago, hectrol said:

    The addAction does not work

    That's because your code is wrong. I guess it should be like this (pay attention to the formatting and readability):

    _x addAction [
        ":: Rescue - Rescatar :: ",
        {
            ["Task_CIV_REHEN_NAMUVAKA_1", "SUCCEEDED"] call BIS_fnc_taskSetState;
    
            {
                _x setCaptive false;
                _x enableAI "PATH";
                _x setUnitPos "AUTO";
            } forEach (units CIV_REHEN_NAMUVAKA_1);
    
            (units CIV_REHEN_NAMUVAKA_1) joinSilent (group player);
        }
    ];

     


  2. 1 hour ago, avibird 1 said:

    I would like to add this code to the above removing the red part

    If you were able to highlight the code, then you can remove it.

     

    1 hour ago, avibird 1 said:

    addMissionEventHandler ["entityRespawned",{  params ["_new","_old"];  if (_new isKindOf "CAManBase") then {  [_new,face _old] remoteExec ["setFace"];  [_new,speaker _old] remoteExec ["setSpeaker"];  }  }];

    This code should be executed once, therefore it should be placed, for instance, in initServer.sqf event script.

     

    2 hours ago, avibird 1 said:

    I can't seem to get the right bracket arrangement to see if this works.

    Make the code readable, don't use strings with code (since code highlighting doesn't work in strings), as I demonstrated, and use programmer's editor with code highlighting.


  3. 2 minutes ago, redarmy said:

    Can i ask.. "-1" is signaling a random distance in the area from centre point?

    No, according to the BIKI:

    Quote

    -1 can be used for exact waypoint placement

     

    Just noticed, that PositionASL should be used if radius is negative, so this is fixed version:

    _wp = BB addWaypoint [AGLToASL (randomPoint call BIS_fnc_randomPosTrigger), -1];

     

×