Jump to content

Antman2o1o

Member
  • Content Count

    40
  • Joined

  • Last visited

  • Medals

Status Updates posted by Antman2o1o

  1. George, I found you and David Doss having a discussion on this thread 

     

    I have tried the code below and nothing happens any ideas why?

    NOTES:

    I have tried: Full Bush Path:  a3\plants_f\Bush\b_ficusc2d_f.p3d and without full path  b_ficusc2d_f.p3d

    The bushes do not get replaced

    CODE SAMPLE BELOW 
     

    if (isServer) then {

    private _repleacearray = [

    ["a3\plants_f\Bush\b_ficusc2d_f.p3d", "a3\plants_f\Bush\b_ArundoD3s_F.p3d", 0],
    ["a3\plants_f\Bush\b_neriumo2d_f.p3d", "a3\plants_f\Bush\b_ArundoD3s_F.p3d", 0]
        
    ];


    {
        private _a = ((getModelInfo _x) select 0);
        private _c = _repleacearray select {_a == _x select 0};
        
        if !( _c isEqualTo []) then {
        
            private _b = ((getModelInfo _x) select 1);
            private _replacetree = ([(_c select 0) select 1] call BIS_fnc_simpleObjectData) select 1;
            private _directionOffset = (_c select 0) select 2;

            private _position = getPosWorld _x;
            private _vectorDirUp = [vectorDir _x, vectorUp _x];

            
             
            hideObjectGlobal  _x;
            private _simpletree = createSimpleObject [_replacetree, _position];
            _simpletree setVectorDirAndUp _vectorDirUp;
            _simpletree setDir (getdir _simpletree) + _directionOffset;
            _simpletree enableSimulationGlobal false;
            
            systemchat format["getModelInfo: %1     getPosWorld: %2     replacing tree ",getModelInfo _x, getPosWorld _x,  _x];    

        };

            
    } forEach nearestTerrainObjects 
        [
            [worldSize/2, worldSize/2], 
            ["Tree"], //["Tree","Bush"],
            worldSize, 
            false
        ];
    };

    hint "Replacing_trees_script done";

     

    Any help appreciated

     

    Ant

  2. Pierre,  I am trying to change the appearance of this civilian group created in the code below.

     

    THIS CODE WORKS TO SPAWN GROUPS. SO GOOD TILL HERE.

     

    hint parseText "<img size='6' image='images\rap.paa'/><br/><t align='center' color='#b80406' shadow='2' size='2.75'>WARNING</t><br/><t align='center' color='#FFFFFF'>------------------------------</t><br/><t align='center' color='#FFFFFF'> Suicide Bombers Have Been Detected.</t><t align='center' color='#b80406'></t><br/><t align='center' color='#f6d140'> Stay On High Alert!</t><t align='center' color='#b80406'></t>"; playSound "nukewarn";

    private ["_k_unit","_grp","_ksound","_chasep","_distep"];

    if (!isServer) exitWith {};

    _origin = _this select 0;
    _no        = _this select 1;
    _ksound = _this select 2;
    _chasep    = _this select 3;
    _distep    = _this select 4;

    if (_no>0) then 
    {
        _nr_k = 0;
        while {_nr_k<_no} do 
        {    
            _grp = createGroup civilian;
            _type_k = ["C_Man_casual_6_F_afro","C_man_1_1_F","C_Man_casual_1_F_asia","C_man_1_3_F","C_man_polo_1_F","C_man_polo_1_F_afro","C_Man_casual_3_F_asia","C_man_polo_1_F_asia","C_man_polo_2_F","C_man_polo_2_F_afro","C_man_polo_2_F_euro","C_Man_casual_4_F_euro","C_man_polo_3_F","C_man_polo_3_F_afro","C_Man_casual_5_F_euro","C_man_polo_3_F_asia","C_man_polo_4_F","C_man_polo_4_F_afro","C_man_polo_4_F_euro","C_man_polo_4_F_asia","C_man_polo_5_F","C_man_polo_5_F_afro","C_man_polo_5_F_euro","C_man_polo_5_F_asia","C_man_polo_6_F","C_man_polo_6_F_afro","C_man_polo_6_F_euro","C_man_polo_6_F_asia","C_man_p_fugitive_F","C_man_p_fugitive_F_afro","C_man_p_fugitive_F_euro","C_man_p_fugitive_F_asia","C_man_hunter_1_F","C_Orestes","C_Nikos","C_Nikos","C_man_sport_2_F_afro","C_man_sport_3_F_asia"] call BIS_fnc_selectRandom;
            _type_k createUnit [getMarkerPos _origin, _grp, "[this,_distep,_ksound,_chasep] execvm 'Scripts\kam.sqf'",1];
            _nr_k = _nr_k +1;
            sleep 1;
        };
    };

     

     

    I added these three lines of code below to try and  change just the uniform and headgear

     

    _uniformTypes = ["U_I_C_Soldier_Para_1_F"];
    _type_k_unit addUniform (_uniformTypes call BIS_fnc_selectRandom);
    _type_k unit addHeadgear "H_ShemagOpen_tan";

     

    SO NEW CODE LOOKS LIKE THIS NOW

     

    hint parseText "<img size='6' image='images\rap.paa'/><br/><t align='center' color='#b80406' shadow='2' size='2.75'>WARNING</t><br/><t align='center' color='#FFFFFF'>------------------------------</t><br/><t align='center' color='#FFFFFF'> Suicide Bombers Have Been Detected.</t><t align='center' color='#b80406'></t><br/><t align='center' color='#f6d140'> Stay On High Alert!</t><t align='center' color='#b80406'></t>"; playSound "nukewarn";

    private ["_k_unit","_grp","_ksound","_chasep","_distep"];

    if (!isServer) exitWith {};

    _origin = _this select 0;
    _no        = _this select 1;
    _ksound = _this select 2;
    _chasep    = _this select 3;
    _distep    = _this select 4;

    if (_no>0) then 
    {
        _nr_k = 0;
        while {_nr_k<_no} do 
        {    
            _grp = createGroup civilian;
            _type_k = ["C_Man_casual_6_F_afro","C_man_1_1_F","C_Man_casual_1_F_asia","C_man_1_3_F","C_man_polo_1_F","C_man_polo_1_F_afro","C_Man_casual_3_F_asia","C_man_polo_1_F_asia","C_man_polo_2_F","C_man_polo_2_F_afro","C_man_polo_2_F_euro","C_Man_casual_4_F_euro","C_man_polo_3_F","C_man_polo_3_F_afro","C_Man_casual_5_F_euro","C_man_polo_3_F_asia","C_man_polo_4_F","C_man_polo_4_F_afro","C_man_polo_4_F_euro","C_man_polo_4_F_asia","C_man_polo_5_F","C_man_polo_5_F_afro","C_man_polo_5_F_euro","C_man_polo_5_F_asia","C_man_polo_6_F","C_man_polo_6_F_afro","C_man_polo_6_F_euro","C_man_polo_6_F_asia","C_man_p_fugitive_F","C_man_p_fugitive_F_afro","C_man_p_fugitive_F_euro","C_man_p_fugitive_F_asia","C_man_hunter_1_F","C_Orestes","C_Nikos","C_Nikos","C_man_sport_2_F_afro","C_man_sport_3_F_asia"] call BIS_fnc_selectRandom;
    _uniformTypes = ["U_I_C_Soldier_Para_1_F"];
    _type_k_unit addUniform (_uniformTypes call BIS_fnc_selectRandom);
    _type_k unit addHeadgear "H_ShemagOpen_tan";
            _type_k createUnit [getMarkerPos _origin, _grp, "[this,_distep,_ksound,_chasep] execvm 'Scripts\kam.sqf'",1];
            _nr_k = _nr_k +1;
            sleep 1;
     


        };
    };

     

    After doing this now the AI Groups do not spawn. Any Ideas why.... any help appreciated.

     

    Ant

    1. Show previous comments  1 more
    2. Antman2o1o

      Antman2o1o

      Thanks, Pierre that worked Happy holidays to you.

    3. pierremgi

      pierremgi

      Same. Happy holidays to you and your family.

    4. Antman2o1o

      Antman2o1o

      Thanks, brother appreciate all  you guys do for the community.

  3. Pierre I am kind of stuck trying to bind a key like maybe  shift+m  to my map I am trying to build.
    Reference code on page below. Do you have any suggestions or know of any code samples?

     

    I have been looking around for examples but have not found any. Kind of lost.

     

    1. Show previous comments  19 more
    2. Antman2o1o

      Antman2o1o

      ok i will keep looking

    3. Antman2o1o

      Antman2o1o

      Pierre, I got it working so once again thank you for your help. The only bug i have left is that the player MAP MARKERS do not show on the map. They show if you place a unit down and start a mission but not with spawned in players. Any ideas or suggestions?

       

      Once again thank you for all your help.

      ANT

    4. Antman2o1o

      Antman2o1o

      Pierre, I got it working so once again thank you for your help. THANK YOU THANK YOU for all your help super awesome!!!!

       

       

      ANT

  4. Larrow,  do you know if it is possible to remove the player map icons/markers when a player enters a specific area that has a trigger. I am not trying to take them out on the whole map only in a specific area that a trigger area represents when players are in that area.  So the remove player markers would be dictated by the trigger area. 

     

    Not sure if possible

  5. Pierre, is it possible to remove the player map icons / markers when a player enters a specific area that has a trigger. I am not trying to take them out on the whole map only in a specific area that a trigger area represents when a player is in that area. 

     

    Not sure if possible

    1. pierremgi

      pierremgi

      hummm, not sure it's simple. As first answer, I'd disable all icons (server or mission difficulty parameters ), then I'd create some icons for some cases (with ctrlAddEventHandler "draw").

    2. Antman2o1o

      Antman2o1o

      I am faking an underground bunker and i dont want players to know where they are at while in that zone that is out in the middle of the ocean. I thought maybe changing the alpha of the markers maybe when they hit the trigger but not sure.

  6. Larrow, quick question. What code am I missing below to repeatedly check every 10 minutes or so for the lead player in a multiplayer persistent game like A3 wasteland.
    I am not sure if the code below checks against real player kills + AI. Also how would I go about making it loop / sleep and recheck every 10 minutes or so to display the lead top 5 players in a hint. 

     

    Hint Example 

    TOP 5 CURRENT PLAYERS
    *************************************

    1st Lead Player Information with Score

    2nd Lead Player Information with Score

    3rd Lead Player Information with Score

    4rth Lead Player Information with Score

    5th Lead Player Information with Score

     

    Also would that be triggered from the init.sqf in the root mission folder

     

    Code Below for score.sqf

    _scores = allPlayers apply{ [ getPlayerScores _x param[5,0], name _x ] }; _scores sort true; hint format[ "%1 has the highest score of %2", _scores #0#1, _scores #0#0 ];

     

    As always any help or suggestions highly appreciated.

     

    ant.png

     

     

×