Announcement

Collapse
No announcement yet.

Coding Help Please? Marker moving between many friendlies on a timer

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Coding Help Please? Marker moving between many friendlies on a timer

    Hello everyone! Need some scripting help!

    I am trying to make a script that will teleport a marker to the location of one friendly troop every 30 seconds in a mutliplayer dedicated game. That means, after 30 seconds, I want the marker on player 1 (lets call him s1) and after 30 more seconds I want it to transport to the location of player 2 (s2 is his name) and after 30 more seconds transport to location of player 3 (s3) and so on. Once the marker has gone through all the player slots which are filled, I want it to repeat, so it would start back at player 1 for 30 seconds, and then back to 2, and so on. Even better would be randomly picking a player each 30 seconds from the list, if that is possible. The hope is this marker would follow the friendly forces around the map generally.

    If it matters the players will be in several groups, 1 for each fire team. Could be anywhere from 2 to 5 groups each with their own leader.

    I want to make sure that it only goes to players that exist, so if only 2 people are playing, it does not go to player 3's location (s3 location).

    I should note: I do not need the marker to STAY on them constantly. I fear that would hurt server performance too much. If I am wrong on that, and it would NOT hurt performance then I guess I could have it actually stay ON the player it ws tracking. That would be great.

    But assuming that would make too much strain on the server, I just need it to update to the players current location when it transports, then sit until the next 30 seconds of time are up, when it moves again.

    I am worried about performance, and any way the script could minimize performance impact would be great.

    Thanks!


    Garthra
    The question foremost in my mind is "what will bring the most tactical fun to the server?"

  • #2
    Here ya go. i have two ways of setting the players up, either one works but you have to do the first one if you want them in order. we can also make it so it displays the name of the player on the marker when it jumps to them.

    init.sqf
    Code:
    playerarray = [p1,p2,p3,p4,p5,p6, etc];
    
    if (!isserver) exitiwth { };
    execVM "playerarray.sqf";
    
     -or- -------------------------------------
    
    playerarray = [ ];
    
    {if (side _x == west) then 
         {
         playerarray = playerarray + [_x];
         }
    } foreach allunits;
    
    if (!isserver) exitiwth { };
    execVM "playerarray.sqf";
    playerarray.sqf (without loop)
    Code:
    if (!isserver) exitwith { };
    
    _time = 30;
    _marker =  createmarker ["marker1",[0,0,0];
    _marker setMarkerShape "ICON";
    _marker setMarkerType "DOT";
    
    while {count playerarray >0} do 
    	{
    		_player = playerarray select ((count playerarray)-1);
    	 _var1 = 1;
    	 while {_var1==1} do 
    	 			{
    	 			_marker setmarkerpos (getpos _player);
    	 			};
    If (!(isnull _player)) then {
    	 	                     sleep _time;
                                        };
    	 	_var1 = 0;
    	 	playerarray = playerarray - [_player];
    	 };
    All this does is set a marker on the next consecutive player in the array

    Note that this just goes through each player once. this next one loops

    playerarray.sqf (with loops)
    Code:
    if (!isserver) exitwith { };
    
    _playerarray2 = playerarray;
    _time = 30;
    _marker =  createmarker ["marker1", [0,0,0];
    _marker setMarkerShape "ICON";
    _marker setMarkerType "DOT";
    
    while {count _playerarray2 >0} do 
    	{
    		_player = _playerarray2 select ((count _playerarray2)-1);
    	 _var1 = 1;
    	 while {_var1==1} do 
    	 			{
    	 			_marker setmarkerpos (getpos _player);
    	 			};
    If (!(isnull _player)) then {
    	 	sleep _time;
                                         };
    	 	_var1 = 0;
    	 	_playerarray2 = _playerarray2 - [_player];
    	 };
    
    waituntil {count _playerarray2==0};
    
    nul = [ ] execVM "playerarray.sqf";
    Last edited by Yink; 05-01-2013, 08:02 PM.
    Yink | Vanilla Pilot | Killer of Stirling | CS GOD | Projects Team

    Comment


    • #3
      Re: Coding Help Please? Marker moving between many friendlies on a timer

      Thanks Yink! I will be testing this out some time in the next week or two! :)
      Appreciate the help very much!
      The question foremost in my mind is "what will bring the most tactical fun to the server?"

      Comment


      • #4
        Re: Coding Help Please? Marker moving between many friendlies on a timer

        FIX TIME (as usual)

        i done goofed on the second player array init thingy thing:
        And if you still want it in a certain order defining an array with all units in it is always better, and having a player not there will not affect the results (because of the isnil check)
        Code:
        playerarray = [ ];
        if (!isserver) exitiwth { };
        
        {if (side _x == west) then 
             {
             playerarray = playerarray + [_x];
             }
        } foreach allunits;
        
        execVM "playerarray.sqf";
        and if you want the player name next to the marker, then edited code is:
        (i also fixed some syntax errors that I missed)

        playerarray.sqf
        Code:
        if (!isserver) exitwith { };
        
        _marker = this select 0;
        _playerarray2 = playerarray;
        _time = 30;
        
        if (isnil _marker) then 
           {
           _marker =  createmarker ["marker1", [0,0,0]];
           _marker setMarkerShape "ICON";
          _marker setMarkerType "DOT";
            };
        
        
        while {count _playerarray2 >0} do 
        	{
        
        		_player = _playerarray2 select ((count _playerarray2)-1);
                        _playername = getPlayerUID _player;
                        _marker setmarkertext format["%1 is here",_playername];
        
        	 _var1 = 1;
        	 while {_var1==1} do 
        	 			{
        	 			_marker setmarkerpos (getpos _player);
        	 			};
        If (!(isnil _player)) then {
        	 	sleep _time;
                                             };
        	 	_var1 = 0;
        	 	_playerarray2 = _playerarray2 - [_player];
        	 };
        
        waituntil {count _playerarray2==0};
        
        nul = [_marker] execVM "playerarray.sqf";
        there we go, that should fix some problems. it probably needs some work as I have not tested this at all.
        if you need any help adding other features please post or PM me, and post any questions (please).

        oh and dont worry, this wont hurt server performance noticeably at all
        Last edited by Yink; 05-03-2013, 10:25 PM.
        Yink | Vanilla Pilot | Killer of Stirling | CS GOD | Projects Team

        Comment


        • #5
          Re: Coding Help Please? Marker moving between many friendlies on a timer

          I don't want player names next to the marker. Thanks for the fixes! Will test next week.
          The question foremost in my mind is "what will bring the most tactical fun to the server?"

          Comment


          • #6
            Re: Coding Help Please? Marker moving between many friendlies on a timer

            I got errors. :(

            The first test was with 3 playables, (p2,p3,p4) one of which was actually a player (p2). The second test was trying the shorter init version of the two. The third test was changing the array to include ONLY p2 (the real human player) in case that was the cause.

            Here is my RPT file from those attempts.

            Code:
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            [32007,892.86,0,"XEH: PreInit Started. v1.0.1.196. MISSINIT: missionName=Destroy%20Buildings%20Testing, worldName=Emita, isMultiplayer=false, isServer=true, isDedicated=false"]
            [32007,893.705,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_cache_disable.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"]
            Error in expression <ray = [p2,p3,p4,p5,p6];
            
            if (!isserver) exitiwth { };
            execVM "playerarray.sqf";
            >
              Error position: <exitiwth { };
            execVM "playerarray.sqf";
            >
              Error Missing ;
            File C:\Users\Owner\Documents\ArmA 2 Other Profiles\Garthra\missions\Destroy%20Buildings%20Testing.Emita\init.sqf, line 3
            Error in expression <Emita\init.sqf"
            playerarray = [p2,p3,p4,p5,p6];
            
            if (!isserver) exitiwth { };
            ex>
              Error position: <p5,p6];
            
            if (!isserver) exitiwth { };
            ex>
              Error Undefined variable in expression: p5
            File C:\Users\Owner\Documents\ArmA 2 Other Profiles\Garthra\missions\Destroy%20Buildings%20Testing.Emita\init.sqf, line 1
            Error in expression <ray = [p2,p3,p4,p5,p6];
            
            if (!isserver) exitiwth { };
            execVM "playerarray.sqf";
            >
              Error position: <exitiwth { };
            execVM "playerarray.sqf";
            >
              Error Missing ;
            File C:\Users\Owner\Documents\ArmA 2 Other Profiles\Garthra\missions\Destroy%20Buildings%20Testing.Emita\init.sqf, line 3
            "JayArmA2Lib: ACTIVE"
            [32007,893.657,0,"x\ace\addons\sys_wounds\XEH_preInit.sqf:8","WARNING: Enhanced Armor difficulty options enabled - this is not recommended in conjunction with ACE Wounds!"]
            [32043,895.693,0,"XEH: PostInit Started"]
            [32043,895.794,0,"CBA_VERSIONING: cba=1.0.1.196, ace=1.14.0.592, acex=1.14.0.371, acex_ru=1.14.0.76, acex_usnavy=1.14.0.78, "]
            [32043,895.953,0,"XEH: PostInit Finished. State: _isClient=true, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=false, _playerCheckDone=true, _sp=true, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=1, _sessionId=3, _level=0, _timeOut=false, _game=1, BIS_functions=L 1-1-A:1, group=L 1-1-A, player=p2, _playerType="USMC_Soldier_TL", _playerGroup=B 1-1-A"]
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            [51278,1848.11,0,"XEH: PreInit Started. v1.0.1.196. MISSINIT: missionName=Destroy%20Buildings%20Testing, worldName=Emita, isMultiplayer=false, isServer=true, isDedicated=false"]
            [51278,1849.07,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_cache_disable.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"]
            Error in expression <ayerarray = [p2,p3,p4];
            
            if (!isserver) exitiwth { };
            execVM "playerarray.sqf";
            >
              Error position: <exitiwth { };
            execVM "playerarray.sqf";
            >
              Error Missing ;
            File C:\Users\Owner\Documents\ArmA 2 Other Profiles\Garthra\missions\Destroy%20Buildings%20Testing.Emita\init.sqf, line 3
            Error in expression <ayerarray = [p2,p3,p4];
            
            if (!isserver) exitiwth { };
            execVM "playerarray.sqf";
            >
              Error position: <exitiwth { };
            execVM "playerarray.sqf";
            >
              Error Missing ;
            File C:\Users\Owner\Documents\ArmA 2 Other Profiles\Garthra\missions\Destroy%20Buildings%20Testing.Emita\init.sqf, line 3
            "JayArmA2Lib: ACTIVE"
            [51278,1849.03,0,"x\ace\addons\sys_wounds\XEH_preInit.sqf:8","WARNING: Enhanced Armor difficulty options enabled - this is not recommended in conjunction with ACE Wounds!"]
            [51297,1850.73,0,"XEH: PostInit Started"]
            [51297,1850.81,0,"CBA_VERSIONING: cba=1.0.1.196, ace=1.14.0.592, acex=1.14.0.371, acex_ru=1.14.0.76, acex_usnavy=1.14.0.78, "]
            [51297,1851.03,0,"XEH: PostInit Finished. State: _isClient=true, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=false, _playerCheckDone=true, _sp=true, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=1, _sessionId=4, _level=0, _timeOut=false, _game=1, BIS_functions=L 1-1-A:1, group=L 1-1-A, player=p2, _playerType="USMC_Soldier_TL", _playerGroup=B 1-1-A"]
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Error loading control bin\config.bin/RscDisplayArcadeUnit/controls/CA_ValueFaction/
            Error loading control bin\config.bin/RscDisplayArcadeUnit/controls/CA_ValueClass/
            Error loading control bin\config.bin/RscDisplayArcadeUnit/controls/CA_ValueVehicle/
            [53592,1914.28,0,"XEH: PreInit Started. v1.0.1.196. MISSINIT: missionName=Destroy%20Buildings%20Testing, worldName=Emita, isMultiplayer=false, isServer=true, isDedicated=false"]
            [53592,1915.17,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_cache_disable.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"]
            Error in expression <qf"
            playerarray = [p2];
            
            if (!isserver) exitiwth { };
            execVM "playerarray.sqf";
            >
              Error position: <exitiwth { };
            execVM "playerarray.sqf";
            >
              Error Missing ;
            File C:\Users\Owner\Documents\ArmA 2 Other Profiles\Garthra\missions\Destroy%20Buildings%20Testing.Emita\init.sqf, line 3
            Error in expression <qf"
            playerarray = [p2];
            
            if (!isserver) exitiwth { };
            execVM "playerarray.sqf";
            >
              Error position: <exitiwth { };
            execVM "playerarray.sqf";
            >
              Error Missing ;
            File C:\Users\Owner\Documents\ArmA 2 Other Profiles\Garthra\missions\Destroy%20Buildings%20Testing.Emita\init.sqf, line 3
            "JayArmA2Lib: ACTIVE"
            [53592,1915.14,0,"x\ace\addons\sys_wounds\XEH_preInit.sqf:8","WARNING: Enhanced Armor difficulty options enabled - this is not recommended in conjunction with ACE Wounds!"]
            [53611,1916.69,0,"XEH: PostInit Started"]
            [53611,1916.79,0,"CBA_VERSIONING: cba=1.0.1.196, ace=1.14.0.592, acex=1.14.0.371, acex_ru=1.14.0.76, acex_usnavy=1.14.0.78, "]
            [53611,1916.99,0,"XEH: PostInit Finished. State: _isClient=true, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=false, _playerCheckDone=true, _sp=true, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=1, _sessionId=5, _level=0, _timeOut=false, _game=1, BIS_functions=L 1-1-A:1, group=L 1-1-A, player=p2, _playerType="USMC_Soldier_TL", _playerGroup=B 1-1-A"]
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            Warning: Script  not executed, param 'timePeriod' value is to small(0.0000)
            The question foremost in my mind is "what will bring the most tactical fun to the server?"

            Comment


            • #7
              Lol oops
              Code:
              Exitiwth
              Change that and it might do something. (That is the init.sqf)
              Also this is not the most efficient way to do this so I can simplify and finalize a script if you want if this one works as it should
              Last edited by Yink; 05-06-2013, 02:56 PM.
              Yink | Vanilla Pilot | Killer of Stirling | CS GOD | Projects Team

              Comment


              • #8
                Re: Coding Help Please? Marker moving between many friendlies on a timer

                Changed the "exitiwth { };" to "Exitiwth { };" still got errors.


                Here is the RPT:
                Code:
                [11741,501.909,0,"XEH: PreInit Started. v1.0.1.196. MISSINIT: missionName=Destroy%20Buildings%20Testing, worldName=Emita, isMultiplayer=false, isServer=true, isDedicated=false"]
                [11741,502.736,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_cache_disable.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"]
                Error in expression <layerarray = [p2,p3,p4];
                if (!isserver) Exitiwth { };
                execVM "playerarray.sqf";
                >
                  Error position: <Exitiwth { };
                execVM "playerarray.sqf";
                >
                  Error Missing ;
                File C:\Users\Owner\Documents\ArmA 2 Other Profiles\Garthra\missions\Destroy%20Buildings%20Testing.Emita\init.sqf, line 2
                Error in expression <layerarray = [p2,p3,p4];
                if (!isserver) Exitiwth { };
                execVM "playerarray.sqf";
                >
                  Error position: <Exitiwth { };
                execVM "playerarray.sqf";
                >
                  Error Missing ;
                File C:\Users\Owner\Documents\ArmA 2 Other Profiles\Garthra\missions\Destroy%20Buildings%20Testing.Emita\init.sqf, line 2
                "JayArmA2Lib: ACTIVE"
                [11741,502.699,0,"x\ace\addons\sys_wounds\XEH_preInit.sqf:8","WARNING: Enhanced Armor difficulty options enabled - this is not recommended in conjunction with ACE Wounds!"]
                [12091,508.509,0,"XEH: PostInit Started"]
                [12091,508.613,0,"CBA_VERSIONING: cba=1.0.1.196, ace=1.14.0.592, acex=1.14.0.371, acex_ru=1.14.0.76, acex_usnavy=1.14.0.78, "]
                [12091,508.782,0,"XEH: PostInit Finished. State: _isClient=true, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=false, _playerCheckDone=true, _sp=true, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=1, _sessionId=3, _level=0, _timeOut=false, _game=1, BIS_functions=L 1-1-A:1, group=L 1-1-A, player=p2, _playerType="USMC_Soldier_TL", _playerGroup=B 1-1-A"]

                This was again, p2 (real player garthra) ,p3 (playable computer), p4 (playable computer) all in the array and all grouped in the editor.




                This second one is JUST p2 (the real player, garthra) in the array, and the other two guys (p3, and p4) deleted both from the editor and the array.


                Code:
                [15597,664.845,0,"XEH: PreInit Started. v1.0.1.196. MISSINIT: missionName=Destroy%20Buildings%20Testing, worldName=Emita, isMultiplayer=false, isServer=true, isDedicated=false"]
                [15597,665.69,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_cache_disable.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"]
                Error in expression <sqf"
                playerarray = [p2];
                if (!isserver) Exitiwth { };
                execVM "playerarray.sqf";
                >
                  Error position: <Exitiwth { };
                execVM "playerarray.sqf";
                >
                  Error Missing ;
                File C:\Users\Owner\Documents\ArmA 2 Other Profiles\Garthra\missions\Destroy%20Buildings%20Testing.Emita\init.sqf, line 2
                Error in expression <sqf"
                playerarray = [p2];
                if (!isserver) Exitiwth { };
                execVM "playerarray.sqf";
                >
                  Error position: <Exitiwth { };
                execVM "playerarray.sqf";
                >
                  Error Missing ;
                File C:\Users\Owner\Documents\ArmA 2 Other Profiles\Garthra\missions\Destroy%20Buildings%20Testing.Emita\init.sqf, line 2
                "JayArmA2Lib: ACTIVE"
                [15597,665.653,0,"x\ace\addons\sys_wounds\XEH_preInit.sqf:8","WARNING: Enhanced Armor difficulty options enabled - this is not recommended in conjunction with ACE Wounds!"]
                [15637,667.58,0,"XEH: PostInit Started"]
                [15637,667.666,0,"CBA_VERSIONING: cba=1.0.1.196, ace=1.14.0.592, acex=1.14.0.371, acex_ru=1.14.0.76, acex_usnavy=1.14.0.78, "]
                [15637,667.828,0,"XEH: PostInit Finished. State: _isClient=true, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=false, _playerCheckDone=true, _sp=true, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=1, _sessionId=4, _level=0, _timeOut=false, _game=1, BIS_functions=L 1-1-A:1, group=L 1-1-A, player=p2, _playerType="USMC_Soldier_TL", _playerGroup=B 1-1-A"]
                668.111 ACRE: Pipe opened.
                The question foremost in my mind is "what will bring the most tactical fun to the server?"

                Comment


                • #9
                  Re: Coding Help Please? Marker moving between many friendlies on a timer

                  :) try exitwith

                  Comment


                  • #10
                    Re: Coding Help Please? Marker moving between many friendlies on a timer

                    I do not understand this.

                    I had "exitiwth { };" at first. I got errors.

                    I changed it to "Exitiwth { };" I tested that and got errors.


                    Now you are telling me to change it back to "exitwith {};"? Didn't I just test that?

                    Or do you mean make that line "exitwith" [That is delete the "{};"?}

                    I do not understand...
                    The question foremost in my mind is "what will bring the most tactical fun to the server?"

                    Comment


                    • #11
                      Re: Coding Help Please? Marker moving between many friendlies on a timer

                      Exitwith { };

                      one word meaning exit script with nothing as in the { };

                      In this case if not server leave this script with nothing
                      if (!isserver) Exitiwth { };

                      Or at least thats how I understand it garth m8.
                      not exitiwth or any other typo :)

                      if (condition) exitWith {Code}

                      http://community.bistudio.com/wiki/exitWith
                      The path of my life is strewn with cowpats from the devil's own satanic herd.

                      Comment


                      • #12
                        Re: Coding Help Please? Marker moving between many friendlies on a timer

                        There is no action word in pogram language "exitiwth", but only "exitwith". I belive Yink mean check word exitIWth in init and write it correct exitWIth, btw no difference between exitwith or Exitwith. So u should use exitwith {}. He only mistake in letter positions in this word, not lower case.
                        Seems for me there could be problem with
                        Code:
                        while {_var1==1} do 
                        	 			{
                        	 			_marker setmarkerpos (getpos _player);
                        	 			};
                        If im understand correct ur task and if Yink's idea is correct and if i've drinked not much i think this should work
                        Code:
                        if (!isserver) exitwith { };
                        
                        _marker = this select 0;
                        _playerarray2 = playerarray;
                        _time = 30;
                        
                        if (isnil _marker) then 
                        	{
                        	_marker =  createmarker ["marker1", [0,0,0]];
                        	_marker setMarkerShape "ICON";
                        	_marker setMarkerType "DOT";
                        	};
                        
                        while {count _playerarray2 >0} do 
                        	{
                        	_player = _playerarray2 select ((count _playerarray2)-1);
                        	_playername = getPlayerUID _player;
                        	_marker setmarkertext format["%1 is here",_playername];
                        	If (!(isnil _player)) then 
                        		{
                        		_marker setmarkerpos (getpos _player);
                        		sleep _time;
                        		};
                        	_playerarray2 = _playerarray2 - [_player];
                        	};
                        
                        waituntil {count _playerarray2==0};
                        
                        nul = [_marker] execVM "playerarray.sqf";
                        Last edited by Chichco; 05-08-2013, 04:18 AM. Reason: code optimization

                        Comment


                        • #13
                          Re: Coding Help Please? Marker moving between many friendlies on a timer

                          The Chich Knows




                          Comment


                          • #14
                            Re: Coding Help Please? Marker moving between many friendlies on a timer

                            Thank you all for your input! I feel embarrassed about the typo.
                            The question foremost in my mind is "what will bring the most tactical fun to the server?"

                            Comment


                            • #15
                              Re: Coding Help Please? Marker moving between many friendlies on a timer

                              Originally posted by Garthra View Post
                              Thank you all for your input! I feel embarrassed about the typo.

                              NEVER Fell embarrassed... until you forget ",;" and then search for three days for that error.

                              and code is

                              Code:
                              CaSeSeNiTivE




                              Comment

                              Connect

                              Collapse

                              TeamSpeak 3 Server

                              Collapse

                              Advertisement

                              Collapse

                              Twitter Feed

                              Collapse

                              Working...
                              X