Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Posts posted by DeadCossack

  1. Hi guys, I'm making a SP mission with quite a few cutscenes. In these scenes I'm using code like this:


    cutText ["", "BLACK FADED", 7];
    [0,0,false] spawn BIS_fnc_cinemaBorder;
    sleep 2;
    Colonel playmove "Acts_B_hub01_briefing";
    titleCut ["", "BLACK IN", 10];
    sleep 4;
    player KbAddTopic ["introduction","texts.bikb","",""];        
    Colonel KbAddTopic ["introduction","texts.bikb","",""];

    Colonel kbTell [player, "introduction", "speech2"];
    hint "Listen carefully!";
    sleep 55;
    [1,1,false] spawn BIS_fnc_cinemaBorder;



    combined with text.bikb it allows me to achieve:


    a cutscene with cinematic borders;

    fully voiced character with lipsync and animation;

    player can't move during scene.


    The issues I have:

    player still can use his weapon during the cutscene;

    I can't set other units in player's team to gather around him. like they're listening to briefing.





    Situation #2


    I'm making an interrogation scene. Using this piece of code


    cutText ["", "BLACK FADED", 5];
    [0,0,false] spawn BIS_fnc_cinemaBorder;
    Zhyrandole switchMove "Acts_ExecutionVictim_Loop";
    sleep 5;
    titleCut ["", "BLACK IN", 10];
    sleep 5;
    player switchMove "Acts_Executioner_Backhand";
    Zhyrandole switchMove "Acts_ExecutionVictim_Backhand";
    sleep 5;
    Zhyrandole switchmove "Acts_ExecutionVictim_Loop";
    player KbAddTopic ["introduction","text2.bikb","",""];        
    Zhyrandole KbAddTopic ["introduction","text2.bikb","",""];
    Zhyrandole kbTell [player, "introduction", "zhyrandole"];
    hint "Listen carefully!";
    sleep 5;
    player playMoveNow "AidlPercMstpSlowWrflDnon_G01";
    sleep 15;
    [1,1,false] spawn BIS_fnc_cinemaBorder;


    it allows me to achieve:

    interrogated unit is on his knees; 

    animation of hitting + reacting of both player and interrogated unit;

    interrogated unit spills information.


    The issues I have:

    Interrogated unit turns arround randomly, not facing player;

    player's transition to idle animation makes him draw his weapons(main and secondary);

    I can't set other units in player's team to gather around him. like they're taking part in the process.



    Will appreciate any help.

  2. Now I'm getting opposite error. Game expects Array, but gets Object -_-

    5 hours ago, Dedmen said:



    _offroad = ([getMarkerPos "vehicleNE", 140, "I_G_Offroad_01_F", WEST] call BIS_fnc_spawnVehicle) select 0;
    OFFROAD1 = _offroad select 0;
    _crewNE = _offroad select 2;
    OFFROAD1 setVehicleVarName "OFFROAD1"; 

    How about that? The wiki page only shows a side being used. So I guess specifying a empty group might not work.


  3. Thank you kindly, sir. But now I have another trouble(yeah I'm not good at this)

    My OFFROAD1 is finally variablename, but my crew won't spawn in it, it spawns outside vehicle and won't assign to it -_-

    23 minutes ago, Dedmen said:

    Do I have something in my eye or what is this that I'm seeing here?

    or "missionNamespace setVariable ["OFFROAD1", _OFFROAD1]"?



    Well.. https://community.bistudio.com/wiki/BIS_fnc_spawnVehicle returns Array.... So I guess that's why it's an array.

    OFFROAD1 = ([getMarkerPos "vehicleNE", 140, "I_G_Offroad_01_F", _crewNE] call BIS_fnc_spawnVehicle) select 0;
    OFFROAD1 setVehicleVarName "OFFROAD1"; 




  4. 2 hours ago, pierremgi said:

    you can add a condition. "seized by blufor" is just a preset condition. Add something like this way:

    this && {side _x == EAST && _x inArea thisTrigger} count allUnits > 0


    For your former question (adding a variable name on a spawned unit):

    _OFFROAD1 = [getMarkerPos "vehicleNE", 140, "I_G_Offroad_01_F", _crewNE] call BIS_fnc_spawnVehicle;


    You can just make the variable global (OFFROAD1 instead of _OFFROAD1). As you are in SP, this variable (then the vehicle) will be defined in any of your mission scripts:

    OFFROAD1 = [getMarkerPos "vehicleNE", 140, "I_G_Offroad_01_F", _crewNE] call BIS_fnc_spawnVehicle;


    Just to be exhaustive, you can use XianGrim method with setVehivleVarName but it's rather useful to respawn objects with their initial variable names:

    _OFFROAD1 setVehicleVarName "OFFROAD1";

    _OFFROAD1 call compile Format ["%1=_This","OFFROAD1"];

    Now, your vehicle is "workable" as OFFROAD1.



    Much thanks to you, mr. pierremgi! But here is another trouble. The game sees OFFROAD1 as an Array, not an object. Any ideas why?(

  5. 19 hours ago, XianGrim said:

    Could you just use the "Seized by Blufor" condition in the trigger to fire your cutscene.sqf? When all the units are dead/have run away from the area, the cutscene plays?

    Thanks for your reply, Xian. The thing is, that the area is empty by default. No opfor units. Then player and his team appear, their presence shoot spawnvehicle Trigger and opfor car starts approaching main character. The problem is, "Seized by BLUFOR" trigger will shoot, when Protagonist will enter my designated area, but his enemies won't spawn yet.


  6. 15 hours ago, pierremgi said:

    Not sure you take the problem by the right side. You can spawn units and make triggers working without any specific name for the units.

    the question is about your trigger(s). How did you write it(them)?

     So, I will describe the situation. Protagonist and his teammates go to a certain area. Vehicle, full of Tangos, spawns and rides towards them. Fight starts. After a firefight(when all enemies r dead) I want my main character to get a hint about certain building. Entering this building will start a script, which changes a time of day. 

    Reasons I need variable 4 vehicle ad enemy units:

    - to lock a vehicle 3 protagonist and his crew(because of my mission's storytelling);

    - to shoot a hint-trigger.(I don't want remaining  Tangos to attack my team, while my skiptime-script and a short cutscene are playing).

  7. 22 hours ago, XianGrim said:

    Take a look at vehicleVarName: https://community.bistudio.com/wiki/vehicleVarName


    Here's a script for respawning a vehicle I picked up. Not my code at all, but I can't recall who wrote it to give credit but its theres lol. Take a look there and it might point you in the right direction.


      Reveal hidden contents

    _vehicle = _this select 0;

    _respawntime = 15;

    _facingofvehicle = getDir _vehicle;

    _positionofvehicle = getPosATL _vehicle;

    _vehicletype = typeOf _vehicle;

    _vehicleName = vehicleVarName _vehicle;


    //hint format ["%1\n%2\n%3\n%4\n%5\n%6",_vehicle,_respawntime,_facingofvehicle,_positionofvehicle,_vehicletype,_vehicleName];

    if(isServer) then{

        while {true} do { //Loop forever

            if((!alive _vehicle) || (!canMove _vehicle)) then


                waitUntil {count crew _vehicle == 0};

                deleteVehicle _vehicle;

                sleep _respawntime;

                _vehicle = _vehicletype createVehicle _positionofvehicle;

                _vehicle setPosATL _positionofvehicle;

                _vehicle setDir _facingofvehicle;

                missionNamespace setVariable [_vehicleName, _vehicle];

                publicVariable _vehicleName;


            sleep 15;





    thanks, mate, I will try it out.

  8. Hi guys, I am developing a pretty ambitious mission for ARMA3 singleplayer. I made a lot of spawns of enemy units to decrease CPU loading on my mission. But I have a serious issue, I can't find a way to give these groups and vehicles a variable names for my triggers to work in case of their elimination and so on. Here is an example of my spawn script:


    _crewNE = [];
    _offroad1 = [];
    _mygroupNE = [];

    if (isServer) then {

    _crewNE = creategroup EAST; 
    _OFFROAD1 = [getMarkerPos "vehicleNE", 140, "I_G_Offroad_01_F", _crewNE] call BIS_fnc_spawnVehicle;
    _wp1 = _crewNE addWaypoint [(getmarkerpos "vNE"), 0];
    _wp1 setWaypointType "TR UNLOAD";
    _wp1 setWaypointSpeed "FULL";
    _wp2 = _crewNE addWaypoint [(getmarkerpos "vNE1"), 0];
    _wp2 setWaypointType "SAD";
    _wp2 setWaypointSpeed "FULL";

    _mygroupNE = [getmarkerpos "vehicleNE", RESISTANCE, ["I_C_Soldier_Bandit_5_F","I_C_Soldier_Bandit_1_F","I_C_Soldier_Para_8_F","    I_C_Soldier_Para_4_F","I_C_Soldier_Para_3_F","I_C_Soldier_Bandit_4_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
    _wp1a = _mygroupNE addWaypoint [getmarkerpos "vNE1", 0];
    { _x setUnitPos "UP"; } forEach (units _mygroupNE);

    sleep .5;
    _mygroupNE1 = _mygroupNE;
    { _x assignAsCargo (_OFFROAD1 select 0); _x moveIncargo (_OFFROAD1 select 0);} foreach units _mygroupNE;