Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Posts posted by sizraide

  1. 4 minutes ago, sarogahtyp said:

    As I already told you. Your shown code is working perfectly. Try it yourself in debug console!


    This is working there:

    private _dummy = [] spawn
     if(!isDedicated) then
       addCamShake [2, 2.5, 20]; 
        sleep 0.05; 
        titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 1</t>", "PLAIN DOWN", -1, true, true]; 
        sleep 8; 
        titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 2</t>", "PLAIN DOWN", -1, true, true];

    There is no problem with your shown code. Maybe it is the code you did not show, who knows?

    Same results with debug console, this time it dissapears faster only.

  2. 9 minutes ago, sarogahtyp said:
    titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 1</t>", "PLAIN DOWN", 0.5, true, true]; 
        titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 2</t>", "PLAIN DOWN", 0.5, true, true];


    I tested above in debug console and it works well. displays both texts about 5 seconds as it should with speed set to 0.5

    Same results, It appears then disappears really fast.

  3. 2 minutes ago, Soapbox0331 said:


    First text appears then dissapears really fast, second text doesn't show up at all.


    if(!isDedicated) then


        addCamShake [2, 2.5, 20];

        sleep 0.05;

        titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 1</t>", "PLAIN DOWN", -1, true, true];

        titleFadeOut 8;

        titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 2</t>", "PLAIN DOWN", -1, true, true];
        titleFadeOut 8;


    Here is what I did. Probably something wrong.

  4. 10 minutes ago, sarogahtyp said:

    Read DreadedEntity's comment bout 3rd parameter in biki:




    Reading biki is a general rule during scripting...

    I changed the of -1 to 8 and there is no difference. It dissapears way too quick. It appears only for like 1-2 seconds and then disappears really fast.



    titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 2</t>", "PLAIN DOWN", 8, true, true];


    I even tried 80 instead of 8.



    titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 2</t>", "PLAIN DOWN", 80, true, true];


    Same results.

  5. Hello, I'm creating a COOP mission.

    I have some dialog and I'm using TitleText, the text dissapears too fast even though I don't know why?

    Here is my script.


    scriptedCharge = "DemoCharge_Remote_Ammo_Scripted" createVehicle (getMarkerPos "amb1"); 

    scriptedCharge setDamage 1;


    if(!isDedicated) then


        addCamShake [2, 2.5, 20];

        sleep 0.05;

        titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 1</t>", "PLAIN DOWN", -1, true, true];

        sleep 8;

        titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 2</t>", "PLAIN DOWN", -1, true, true];




  6. 39 minutes ago, beno_83au said:

    There's a few ways, but probably the easiest is in the init of each group leader, as you've said. Doing it this way though, you need to define them as global variables: https://community.bistudio.com/wiki/Variables#:~:text=two main scopes%3A-,Global Scope,-A global variable. So just removing the _ from _aiGroup and _playerGroup is enough, as the _ treats them as local (explained in that link). I only used local variables to demonstrate what info needed to go where.

    Got it, it works.



  7. 19 minutes ago, beno_83au said:

    Ok, in that case let's start with:

    _players = players;

    You've declared players as a group (in the leaders init) - https://community.bistudio.com/wiki/group. So _players is a group. Keep that in mind.




    toWhom is the first parameter, which here is _x. The group of a1, a2, etc, is considered, and in this case you are just revealing the player to the group of a1, then a2, then a3 and so on, because of how you've written it. But even in your original example you've just using a group (_players) instead of an object, so it was failing at that point. So........

    toWhom reveal target
    toWhom: Object or Group which receives revealing information
    target: Object which is revealed

    You need to write it so that an object or group has an object revealed to them:

    	_aiGroup reveal _x;
    } forEach (units _playerGroup);

    With _aiGroup and _playerGroup defined correctly, that will reveal each unit in the player's group to the AI group.

    How can I define it correctly?

    Just placing _aiGroup = group this; and _playerGroup = group this; in the squadleaders init fields?

  8. Hello, i'm creating a COOP mission.

    I want a group of AI to reveal to a group of players


    _players = players;



        _x enableAI "MOVE";

        _x reveal _players;

    } forEach [a1,a2,a3,a4,a5];

    sleep 3;



    This is my script but it doesn't work.

    I have this in the squad leader of the players group


    players = group this;

    I want to have a trigger where when players walk into it.
    It runs a script and it unhides a few AI and immediately makes the AI aware of the group of players so the AI will immediately start shooting the group of players.

  9. Hello, i'm creating a COOP mission where they fight AI in an urban environment

    I was wondering if their is a way I can create bigger white smoke grenades? Is there a way to increase the particle size or effect?



        Smoke="SmokeShell" createVehicle (getPos _x);

    } forEach [red, red_1, red_2, red_3, red_4, red_5, red_6];


    This is the script i'm using for now

  10. On 6/17/2021 at 1:50 AM, pierremgi said:

    OK, i didn't notice the fact you kill an AI.

    What is your context: mods, modules (there is one BI "friendly fire" module which ends the mission if you are killing a friendly unit).  You didn't say if your player is BLUFOR or else... So without any precision about the scenario, that can be hard to help.


    How do you test it? In MP session on preview, or with a friend as client? or with a dedicated server?


    EDIT: I have a track: the switchMove "HubSpectator_stand"  could be a problem if this animation is for spectator, so there is no more player... try without this line.


    So, for whatever reason.


    I created a new scenario and just moved over the files and tested it without removing the switchMove.


    Now it doesn't fail mission every time I kill an AI, weird. Probably something in my multiplayer tab?

  11. 14 minutes ago, pierremgi said:

    In MP, the respawnOnStart is set to 1 by default (so if you omit in description.ext) and that makes the player respawn... (It's a strange BI decision, imho, useless, not saying counter-productive, if you don't open a dialog for choosing the respawn position or the loadout)


    Anyway, if your MP mission parameters (in editor) are set for mission fails if all players are dead, that could be your issue. So, check your editor: mission attributes/multiplayer and the way you want to start (respawning or not).


    But why does it affect AI though? not players?

  12. I don't know if this is a glitch, bug, or whatever.


    But I'm creating a 4 man COOP map and whenever I kill an AI (BLUFOR) my mission immediately fails?

    I have nothing in my scripts, they're empty.


    But my game keeps mission failing when I kill the AI on my side?

    I checked the multiplayer section in the attributes tab and I currently have respawning set to Disabled.

    Don't know what else is left? 


    These are what I have in my init.sqf and descprition.ext, other than that. Nothing else.


    Oh and it shows ALL PLAYERS DIED when the mission fails.




    private _offi = officer;

    _offi switchMove "HubBriefing_lookAround2";

    sleep 2;

    player switchMove "HubSpectator_stand";

    sleep 2;

    player switchMove "";


    // Ambush begins


    player allowDamage true;

    player setCaptive false;


    sleep 5;

    bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bombmark";




    class CfgSounds {

        class background_cs


            name = "background_cs";




        class lamps_turning_off


            name = "lamps_turning_off";

            sound[] = {sounds\lamps_turning_off.wogg, db+200, 1.0};






    // overviewPicture = "images\background.jpg";

    onLoadName      = THE LAST TOUR;

    author          = sizraide;                                 

    onLoadMission   = Alpha squad;

    // loadScreen       = "images\tlt.jpg";

    enableDebugConsole = 2;




  13. 14 hours ago, stanhope said:

    I'm assuming you want this check to run every time the units get damaged and not just when the server starts so:

    	_x addEventHandler ["HandleDamage", { 
    		params ["", "", "_damage"]; 
    		if (_damage > 0.1} then {
    			_damage = 1;
    } forEach [test1, test2];


    Works wonderfully, just a tiny bracket mistake in your part where you have } instead of ) next to > 0.1.

    Other than that it works! Thank you!

  14. Hello, i'm creating a COOP mission.

    I have this script in the initLocalPlayer.sqf, basically I want a specific number of AI's to immediately die (setDamage 1;) when they loose health. (get shot by players)




        if ((damage _x)>0.1) then 


            _x setDamage 1;

            sleep 1;


    } forEach [test1, test2];

    I've tried damaged and hit eventhandlers but it doesn't work, any help?

  15. 10 hours ago, pierremgi said:


    you could use trigger(s) with activation type: "detected by" . That's fine and you don't need the AI fires for triggering the code!


    The disableAi "move" limits drastically the possibility of the AI to fire (enemy must be in front of AI as it can't turn). Try with disableAI "path" instead.


    Anyway, just for fun:

    if (isServer) then {
      this disableAI "move";
      this addEventHandler ["fired", {
        params ["_unit"];
          _unit spawn {
            params ["_unit"];
            while {alive _unit} do {
              sleep 1;
              if ( allPlayers findIf {_x distance _unit < 15} > -1) then {
                _unit enableAi "move";
         _unit removeEventHandler ["fired",_thisEventHandler];

    in init field of concerned units.

    Thanks for responding quick, before I test this I wanna learn how this script works because i'm trying to improve my knowledge in scripting.

    Would you mind telling me step by step why and what your script does in each line?

  16. Hello, i'm creating a COOP mission where a player has to infiltrate a base and silently kill all enemies.
    and i'm creating an eventHandler that creates a trigger at players location when the enemy fires (when enemy detects player)


    Here is my setup, I have 11 enemies named from first1, first2, first3, first4, etc.

    In their init field I have


    0 = [first1] = execVM "objective1\enemy_detected.sqf";


    Then in the enemy_detected.sqf I have



    private _unit = player;

    private _unitEnemy = _this select 0;


    _unitEnemy addEventHandler ["Fired", {

        sleep 3;



        _tgr = createTrigger ["EmptyDetector", getPosWorld _unit];

        _tgr setTriggerArea [15, 15, 15, false, 15];

        _tgr setTriggerActivation ["ANYPLAYER", "PRESENT", "false"];

        _tgr setTriggerStatements ["this", "activation enableAI "MOVE";", ""];

        _tgr attachTo [_unit, [0,0,0]];



    sleep 1;

    _unitEnemy removeEventHandler ["Fired", 0];


    Now my issue is when I load into the mission I don't receive any popup screen errors and nothing happens when the enemies start firing.

    I have an AI (called activation) that is on "disableAI "MOVE";" and will walk into a trigger area that will spawn enemies around the player in a separate script. (Supposed to represent that the enemies shooting attracted more enemies to player location)


    Also, I have a removeEventHandler to remove the added event as soon as the fired event happens.


    I'm also curious because I don't have much experience with scripting but would this work with COOP?

    because I created this script intended to work for COOP.



  17. 7 hours ago, sarogahtyp said:


    _x is a magic variable and represents the current element in a loop.


    the count command as I used it counts all elements of the given array for which the condition inside the curly brackets is true.

    so it should count every object of the array _units which is inside the heli.

    I got it to work!



    heli1 addEventHandler ["GetIn", 


        private _units = units (_this select 2);

        private _units_num = count _units;

        _in_heli_num = { _x in heli1 } count _units;


        if (_in_heli_num isEqualTo _units_num) then


            heli1 engineOn true;

            heli1 enableAI "Move";

            hint "Script successful";




    Removed the "_" behind heli1 and it worked somehow.