Jump to content

sizraide

Member
  • Content Count

    111
  • Joined

  • Last visited

  • Medals

Posts posted by sizraide


  1. 17 minutes ago, sarogahtyp said:

    maybe you would need some braces there:

     

    
    _in_heli_num = { (_x in heli1) } count _units;

     

    you should just post error messages if a code does not work ... " couldn't get ... to work." is not enough in a scripting forum.

     

    Also the code you posted in your last post should be complete nonsense. At least if your purpose is what you told - to check if all embarking group members are inside the heli already.



    Doesn't work. No error messages popping up, just heli won't turn on its engine and move.


  2. 5 minutes ago, sarogahtyp said:

    maybe you would need some braces there:

     

    
    _in_heli_num = { (_x in heli1) } count _units;

     

    you should just post error messages if a code does not work ... " couldn't get ... to work." is not enough in a scripting forum.

     

    Also the code you posted in your last code should be complete nonsense. At least if your purpose is what you told - to check if all embarking group members are inside the heli already.


    Sorry, basically it didn't show any error messages.

    The heli wouldn't turn on its engine.

     

    I'll try your method again.


  3. 1 minute ago, sarogahtyp said:

     

    what you do with this is that the group of the last player who is inited will be stored in playergroup.

     

    I guess what you really want is to assign all players to the same group, right?


    Well nevermind what I said, but I tried your solution and it didn't work

    but after some researching I came up with this and it works.

     

    Quote

    heli1 addEventHandler ["GetIn", {

     

        private _units = count playableUnits;

        private _pl = count allPlayers;

        private _heli1 = heli1;

     

        if ((_units) == (_pl)) then {

     

            _heli1 engineOn true;

            _heli1 enableAI "Move";

     

        };

    }];

     

    heli1 addEventHandler ["GetOut", {

        hint "Meet up with Sergeant Riley.";

    }];


    I couldn't get the count for players inside heli1 to work.

    ended up comparing if all playable units are = all players.

    • Confused 1

  4. 2 hours ago, sarogahtyp said:
    
    heli1 addEventHandler ["GetIn", 
    {
    	//get group members of embarked unit
    	private _units = units (_this select 2);
    
    	//get number of group members
    	private _units_num = count _units;
    
    	//get number of group members in heli
    	_in_heli_num = { _x in heli1 } count _units;
    
    	if (in_heli_num isEqualTo _units_num) then
    	{
    		_heli1 engineOn true;
    		_heli1 enableAI "Move";
    	};
    }];
    
    heli1 addEventHandler ["GetOut", {
    
        hint "Meet up with Sergeant Riley.";
    }];

     


    Thanks for the solution!

    Just asking I currently have "playergroup = group this;" in each players init, wondering if this affects the script?
     


  5. Hello, i'm creating a COOP mission and I have a script here that enables the helicopter "move" and turn its engine on when the player enters it.


    How can I make it so when the entire "group" of players enter the heli the heli turns its engine on and starts moving.

     

    Quote

    heli1 addEventHandler ["GetIn", {

        private _unit = player;

        private _heli1 = heli1;

     

        if (_unit in _heli1) then

        {

            _heli1 engineOn true;

            _heli1 enableAI "Move";

        };

    }];

     

    heli1 addEventHandler ["GetOut", {

        hint "Meet up with Sergeant Riley.";

    }];

     


  6. 4 minutes ago, pierremgi said:

    So, if you don't wear anything or that, the player is not renegade. Once he grabs this kind of gear, he is the public enemy number one. (If you're wearing one or more of these gears, you are renegade and any unit will shoot at you).

     

    As said, that's a solution for your demand. If you want more, you should elaborate:

    "I'm scripting for a single player scenario,... my player is blufor... I'd like to make him shot by.... when....  reversible or not..."


    Okay, sorry about that ill clarify more clearer.

    Im scripting for a COOP mission.

    Basically, I have a script already that makes OPFOR not attack the player when they're wearing Takistan uniform (Takistan are the OPFOR)
    The task I set for the players is that they're going through a heavily hostile area filled with OPFOR AI and they must meet their squad at the end.

    I want the players to actually get shot when they encounter any BLUFOR AI wearing the Takistan uniform to make it seem like the the AI mistaken the players for being OPFOR when they're not.


  7. 1 hour ago, pierremgi said:

    Your player is BLUFOR?
    You can add in init field of the player:
    0 = this spawn {
        waitUntil {uniform _this in  ["UniformClass1Here","UniformClass2Here",...] or headGear _this in ["helmetClass1Here","helmetClass1Here",..] or backPack _this in ["backpackClass1Here","backpackClass1Here",...]};
       player addRating (rating player - 3000);

    };

     

    That's a basic solution for non-detailed question.

    the classes are to be existent in your game, and they are case sensitive here.

      
     



    So this works, but the BLUFOR AI shoots me regardless of what I wear now, even if i'm not wearing anything.


  8. 1 hour ago, pierremgi said:

    Your player is BLUFOR?
    You can add in init field of the player:
    0 = this spawn {
        waitUntil {uniform _this in  ["UniformClass1Here","UniformClass2Here",...] or headGear _this in ["helmetClass1Here","helmetClass1Here",..] or backPack _this in ["backpackClass1Here","backpackClass1Here",...]};
       player addRating (rating player - 3000);

    };

     

    That's a basic solution for non-detailed question.

    the classes are to be existent in your game, and they are case sensitive here.

      
     


    Yes, my players are BLUFOR, basically I have a mission where they went through an OPFOR base wearing OPFOR uniform.

    And I want them to take it off before meeting their BLUEFOR AI squad so they won't get shot. 


  9. Hello, im fairly new to scripting and only got basic knowledge. So, if you're gonna explain it to me please dumb it down for me.

     

    I want a script where BLUFOR will shoot the player if the player is wearing something specific.

    For example, I want to create a list where BLUFOR will shoot the player if the player is wearing Takistan uniform, pilot helmet, or alice pack.

     

    Any ideas?
     


  10. I'm fairly new to scripting and mission editing in general. I used a script called MovieMaker by aliascartoons

    I have a init.sqf file that runs the script for me. Here it is.
     

    Quote

    cut_scene_1 = [] execVM "AL_movie\cut_scene_screen_effect.sqf";
    waitUntil {scriptdone cut_scene_1};
    sleep 1;
    null = [] execVM "AL_movie\cut_scene_screen_effect.sqf";


    then I have the cut_scene_screen_effect.sqf that is the cutscene itself.

    Quote

    sleep 15;
    if (!hasInterface) exitWith {};
    cutText ["", "BLACK IN", 0];
    -----------------------------------------------------------------------------------------------------------*/

    // 
    loopdone = false;
    while {!loopdone} do {
    //


    // CUTSCENE

    // text
    _txt_1 = ["DEATH FROM ABOVE",5,"center","3","#d99e30"] execVM "AL_movie\txt_display.sqf";
    // -------------------------------------
    _firstshot = [cam1, cam1, target_scene_1, 10, 1, 0.8, true, 0, 0, 2,"grain","none",0,"uav1",FALSE] execVM "AL_movie\camera_work.sqf";
    waitUntil {scriptdone _firstshot};

    // text
    _txt_2 = ["15 minutes after the crash",3,"top_right","1","#FFFFFF"] execVM "AL_movie\txt_display.sqf";
    // -------------------------------------
    _secondshot = [cam2, cam2, target_scene_2, 7, 1, 0.8, true, 0, 0, 2,"grain","none",0,"uav2",FALSE] execVM "AL_movie\camera_work.sqf";
    waitUntil {scriptdone _secondshot};

    // text
    _txt_3 = ["Map created by sizraide",3,"bottom_right","1","#FFFFFF"] execVM "AL_movie\txt_display.sqf";
    // -------------------------------------
    _thirdshot = [cam3, cam3, target_scene_3, 5, 0.8, 1, true, 0, 0, 2,"grain","none",0,"intro_music",FALSE] execVM "AL_movie\camera_work.sqf";
    waitUntil {scriptdone _thirdshot};

    // --------------->> end of camera shots <<---------------------------------------------------------
    };
    cutText [" ", "BLACK IN", 3];
    _camera = "camera" camCreate (getpos player);
    _camera cameraeffect ["terminate", "back"];
    camDestroy _camera;
    "dynamicBlur" ppEffectEnable true;   
    "dynamicBlur" ppEffectAdjust [100];   
    "dynamicBlur" ppEffectCommit 0;     
    "dynamicBlur" ppEffectAdjust [0.0];  
    "dynamicBlur" ppEffectCommit 4;



    When I play the scenario, the scene plays as normal with no errors. But it doesn't stop looping the cutscene. I want it to stop looping.

    I tried terminate and it doesn't work. Any help?

×