Jump to content

meatball

Member
  • Content Count

    734
  • Joined

  • Last visited

  • Medals

Posts posted by meatball


  1. So, I did a bit more experimenting and it clears up some stuff, but raises more questions. The speed at which you can up / down in Overcast is directly related to the starting overcast level. The speed will stay consistent the entire time it's going up or down, but that speed will vary based on the starting level. For example:

    1) Starting a 0 overcast, 0 setOvercast 1; still goes up about .0167 per minute as I mentioned before. But that stays constant the entire time and you'll reach one in about 60-61 minutes.

    2) Starting at .5 overcast, 0 setOvercast 1; goes up just about half at .083. Going from .5 to 1 takes, you guessed it, 60-61 minutes.

    3) Starting at .9 overcast, 0 setOvercast 1; goes up at about .00167 per minute (10x slower than when starting at 0) and takes....about 60-61 minutes to reach 1.

    Starting at 1 and going down works in the inverse with 1 to 0 going the fastest and 0.1 to 0 going the slowest.

    So, yes, that makes a bit more sense of what it's doing, but it makes it a mess to try to handle scripting of weather.


  2. So, I've been spending a lot of time digging through the weather code lately working on a new weather script, and for the most part a lot of the commands are pretty straight forward and work pretty well consistently. There is one exception....setOvercast.

    I've done a lot of testing, and come to the conclusion that setOvercast makes it very difficult to write up any weather scripts. From what I've found, moving the overcast up/down is not a nice straight line up and down over time. Here's what I've found with some testing.

    1) If you start at 0.5 overcast, if you try to go up using '0 setOvercast 1' or down using '0 setOvercast 0' the increase/decrease rate (at first) will be the same at approximately .083 per minute.

    2) If you start at 0 overcast and go up towards 1 using '0 setOvercast 1', you will initially go up at a rate of approximately .0167 per minute.

    3) If you start at 1 overcast and go down towards 0 using '0 setOvercast 0', you will initially go down at a rate of approximately .0167 per minute.

    4) On the other hand, if you try to go up when you are already at a high level of 0.9 and then try to '0 setOvercast 1', it goes extremely slow, only going up approximately .00167 per minute.

    5) And the same goes on the reverse, at 0.1 overcast, going down to 0 goes at .00167 per minute.

    To make matters worse, things don't match up if you use a different transition time. For example, starting at 0, I tried setting 3600 setOvercast 1; (3600 because it takes about 3600 seconds to go from 0 to 1 at .0167/minute). The numbers went up about .011/minute...

    I'm sure with some math magic you can write some script that would look at the original overcast value and figure out how fast it'll go up and down and set the 'setOvercast' command, but it would be soooo much easier if it was just a linear progression up or down, regardless of where you are on the overcast scale to start. If there's any Dev's that could shed some more light on the command, that'd be great. :)


  3. I don't know if this is a default Arma 3 deal, or something BTC related, but anyone notice that a lot of times if you run up to heal someone, your animation will actually throw you around in front of them? Led to a few deaths as people are trying to heal someone else in a firefight and it throws you in front of their muzzle :)


  4. I could be wrong, but not that I know of. You have to package in pbo and pbo is open. Why do you really care? It's not like any of us are making money off of it and almost all of us are using someone else's scripts in some way, shape or form. If someone saves some time/effort by seeing how you did something, hopefully people will credit you if they use anything.

    Heck, one of my missions was 'borrowed' by one clan and for a while there wasn't even a mention who had made it. Bugs you a bit, but in all honestly, does it really matter? :) I'm just happy people are playing/enjoying something I made.


  5. Hello,

    Any idea when the headless will join the slot reserved for it ?

    Can you guys elaborate on this? I've been using a HC and it grabs the correct slot without a problem every time. Once I dropped forceHeadlessClient=1; into the class info for the HC slot in the mission.sqm and set joinUnassigned = false; in my description.ext, the HC just joins the right slot every time. Noone else can join that slot.

    Also to verify what a few other folks said, HC's can connect to a passworded server now. Been doing it since 1.10 dropped with no issues.


  6. I've been messing around with elec's Headless Client Auto Detector script that he developed for A2 and trying to get it working for me in A3. It works for the most part, with one caveat, and maybe someone can see what's going wrong. I've stripped down the original script to the bare essentials and the basic concept is:

    1) The 'Detector' script is called in the init.sqf for all machines.

    2) The script will figure out if there's a headless client and set a variable (elec_hc_connected) to 0. If there is no HC, it will set the server's elec_hc_connected to 0, and all other machines will be set to 1.

    3) In any scripts I call (AI spawn/etc) that I want to run on the HC if available, or server, if there is no HC, you put if(elec_stop_exec == 1) exitWith{}; as the first line so it will drop out for everything but the HC, or server if HC isn't connected.

    Here's the stripped down script:

    elec_stop_exec = 0;
    elec_hc_connected = 0;
    
    //Check if switch is set
    if (!(isServer) && !(hasInterface)) then {
    	elec_hc_connected = 1;
    	publicVariable "elec_hc_connected";
    } else {
    	if (!isServer) then{ 
    		elec_stop_exec = 1;
    	};
    	sleep 3;
    if(elec_hc_connected == 0) then { 
    		if (!isServer) then{ 
    		elec_stop_exec = 1;
    		};
    	} else {
    		if ((isServer) OR (hasInterface)) then{ 
    		elec_stop_exec = 1;
    		};;
    	};
    };
    

    What I'm finding is:

    1) 'Server' / Game being hosted on a players machine, AI called in scripts spawn correctly.

    2) Dedicated Server with a Headless Client connected, AI called in scripts spawn correctly.

    3) Dedicated Server, no headless client connected. AI called in scripts never spawn.

    Don't know if it's a timing thing, or what, but something isn't working right. Reading through it, I don't see why in situation 3, the server would get the variable set to 1, but I'm not sure. Any thoughts?

    ---------- Post added at 00:02 ---------- Previous post was at 23:33 ----------

    Actually, I think I can strip it down even further. Put the following code in a script that's called for all in init.sqf.

    // Headless Client Autodetect v0.1
    // By Meatball
    // Inspiration/Ideas from elec's HeadelessClient Autodetection Switch script
    
    // In any script you want to run on HC if available, or on server otherwise, make the first line: 
    // if(spawnExec != 1) exitWith{};
    // This will exit out of the script on any machine that does not have the spawnExec variable set to 1.
    
    // Set the spawnExec variable on all machines to 0.
    spawnExec = 0;
    
    // If this is the server and spawnExec has not already been reset by the HC (see below), set spawnExec to 1.
    if (isServer and (spawnExec !=2)) then {spawnExec = 1;};
    
    // If this is a dedicated client, transmit spawnExec out to all clients as 2, then reset HC variable to 1.
    if (!(isServer) && !(hasInterface)) then {spawnExec = 2;publicVariable "spawnExec";spawnExec = 1;};
    


  7. Has anyone been able to get this to work fully with A3? I've found one problem.

    Have this as the first line of my init.sqf:

    elec_HC_detect = [] execVM "miscScripts\elec_HC_detect.sqf"; 
    waitUntil {scriptDone elec_HC_detect};
    

    Also have this as the top line of my "AI Spawning" scripts that are run at the end of of my init.sqf.

    if(elec_stop_exec == 1) exitWith{};

    I'm getting the following results:

    1) 'Server' / Game being hosted on a players machine, AI called in my scripts spawn correctly.

    2) Dedicated Server with a Headless Client connected, AI called in my scripts spawn correctly.

    3) Dedicated Server, no headless client connected. AI called in my scripts never spawn.

    Anyone run into anything similar, or have any ideas?


  8. I was digging into the script a bit more and it seems like shk_pos_fnc_getpos.sqf is the key.

    //  In: [position,distance,direction]
    // Out: position
    private ["_pos","_dst","_dir","_orgX","_orgY","_posX","_posY"];
    _pos = _this select 0;
    _dst = _this select 1;
    _dir = _this select 2;
    
    _orgX = _pos select 0;
    _orgY = _pos select 1;
    _posX = _orgX + (_dst * sin _dir);
    _posY = _orgY + (_dst * cos _dir);
    
    [_posX,_posY,0]
    

    Shouldn't I be able to throw an isFlatEmpty check into that somehow so it'll keep checking till it finds a location that's somewhat flat/empty?


  9. Added: The new attachment list box checks against the config for restricted attachments.

    Hmm, maybe it's just me, but it still does not appear to limit attachments based on what's in the config.sqf. I have a random guess too. In my case, I'm not limiting items by putting them in the restriction arrays (bottom sets), I'm limiting what's in the crates by putting everything I want in the crate in the limit arrays (top sets). Are you just looking at the restriction arrays to determine what to pull out?


  10. Yes it does. I've tried setting the 5th parameter to a vehicle (big Green transport chopper), or even just a set distance, 200-300 and it will still do it. My guess is that what's happening is the original check is finding a water location, so it's pulling in and then finding the closest location which is the shore.

    Basically what I'm doing is setting up an area of units (objects/players) I want to move and throwing in two small objects (pencils). I run the SHK_pos based off an objects I have at the center of Altis, then move the first pencil there. Then I use your move objects to move everything else based off the two pencils :) Not the cleanest, but it works pretty well. Maybe the pencils are so small the setPos on them doesn't care that the 'position' it found is under a rock and throws it there, then moveObjects throws everything around it.

    Here's the actual script that runs. It moves nine different batches of objects to random locations across Altis. Some include just objects, others move triggeers and markers as well.

    private ["_startPos","_startPos2","_nukePos","_pickupPos1","_pickupPos2","_pickupPos3","_tmpCheck","_randSide","_opSide","_bluSide"];
    
    // Move Players
    
    _startPos = [randCent,random 12000,[0,359],0,[0,200],300] call SHK_pos;
    startObj2 setpos [_startPos select 0,_startPos select 1,0];
    [startObj1,startObj2,25] execVM "SHK_pos\SHK_moveObjects.sqf";
    startTrig1 setpos [_startPos select 0,_startPos select 1,0];
    startTrig3 setpos [_startPos select 0,_startPos select 1,0];
    
    //  Move Nuke Convoy / Material
    
    _tmpCheck = 1;
    while {_tmpCheck == 1} do {
    _nukePos = [randCent,random 12000,[0,359],0,[1,1500],200] call SHK_pos;
    nukeObj2 setpos [_nukePos select 0,_nukePos select 1,0];
    [nukeObj1,nukeObj2,25] execVM "SHK_pos\SHK_moveObjects.sqf";
    _tmpNukeMark = [nukeObj2,(250+(random 100)),[0,359],0] call SHK_pos;
    "nukeMark" setMarkerPos _tmpNukeMark;
    if ((startObj2 distance nukeObj2) > 5000) then {_tmpCheck = 0};
    };
    
    // Move Depots
    _randSide = random 2;
    // Pick Random Spots
    if (_randSide > 1) then {_opSide = randSide1;_bluSide = randSide2;} else {_opSide = randSide2;_bluSide = randSide1;};
    _opDepot1 = [_opSide,random 7000,[0,359],0,[1,1000],200] call SHK_pos;
    _opDepot2 = [_opSide,random 7000,[0,359],0,[1,1000],200] call SHK_pos;
    while {(_opDepot1 distance _opDepot2) < 5000} do {_opDepot2 = [_opSide,random 7500,[0,359],0,[1,500],200] call SHK_pos;};
    _bluDepot1 = [_bluSide,random 7000,[0,359],0,[1,1000],200] call SHK_pos;
    _bluDepot2 = [_bluSide,random 7000,[0,359],0,[1,1000],200] call SHK_pos;
    while {(_bluDepot1 distance _bluDepot2) < 5000} do {_bluDepot2 = [_bluSide,random 7500,[0,359],0,[1,500],200] call SHK_pos;};
    _greenDepot1 = [randCent,random 12000,[0,359],0,[1,1000],200] call SHK_pos;
    _greenDepot2 = [randCent,random 12000,[0,359],0,[1,1000],200] call SHK_pos;
    while {(_greenDepot1 distance _greenDepot2) < 9000} do {_greenDepot2 = [randCent,random 10000,[0,359],0,[0,500],200] call SHK_pos;};
    
    // Move dummy object 
    csatD1_2 setpos [_opDepot1 select 0,_opDepot1 select 1,0];
    csatD2_2 setpos [_opDepot2 select 0,_opDepot2 select 1,0];
    natoD1_2 setpos [_bluDepot1 select 0,_bluDepot1 select 1,0];
    natoD2_2 setpos [_bluDepot2 select 0,_bluDepot2 select 1,0];
    aafD1_2 setpos [_greenDepot1 select 0,_greenDepot1 select 1,0];
    aafD2_2 setpos [_greenDepot2 select 0,_greenDepot2 select 1,0];
    
    // Move depots to dummy objects
    [csatD1_1,csatD1_2,25] execVM "SHK_pos\SHK_moveObjects.sqf";
    [csatD2_1,csatD2_2,25] execVM "SHK_pos\SHK_moveObjects.sqf";
    [natoD1_1,natoD1_2,25] execVM "SHK_pos\SHK_moveObjects.sqf";
    [natoD2_1,natoD2_2,25] execVM "SHK_pos\SHK_moveObjects.sqf";
    [aafD1_1,aafD1_2,25] execVM "SHK_pos\SHK_moveObjects.sqf";
    [aafD2_1,aafD2_2,25] execVM "SHK_pos\SHK_moveObjects.sqf";
    
    // Move Markers
    "csatD1Mark" setMarkerPos getPos csatD1_2;
    "csatD2Mark" setMarkerPos getPos csatD2_2;
    "natoD1Mark" setMarkerPos getPos natoD1_2;
    "natoD2Mark" setMarkerPos getPos natoD2_2;
    "aafD1Mark" setMarkerPos getPos aafD1_2;
    "aafD2Mark" setMarkerPos getPos aafD2_2;
    
    // Move Pickup Points
    _pickupPos1 = [randCent,(2000 + (random 10000)),[0,359],0,[0,200],150] call SHK_pos;
    _pickupPos2 = [randCent,(2000 + (random 10000)),[0,359],0,[0,200],150] call SHK_pos;
    _pickupPos3 = [randCent,(2000 + (random 10000)),[0,359],0,[0,200],150] call SHK_pos;
    
    pickup1 setpos [_pickupPos1 select 0,_pickupPos1 select 1,0];
    pickup2 setpos [_pickupPos2 select 0,_pickupPos2 select 1,0];
    pickup3 setpos [_pickupPos3 select 0,_pickupPos3 select 1,0];
    
    "pickupMark1" setMarkerPos getPos pickup1;
    "pickupMark2" setMarkerPos getPos pickup2;
    "pickupMark3" setMarkerPos getPos pickup3;
    
    pickupTrig1 setpos [_pickupPos1 select 0,_pickupPos1 select 1,0];
    pickupTrig2 setpos [_pickupPos2 select 0,_pickupPos2 select 1,0];
    pickupTrig3 setpos [_pickupPos3 select 0,_pickupPos3 select 1,0];
    


  11. Hey Shuko, you have any plans of releasing a new version of this? I'm using this in conjunction with your moveObjects script to move players and objectives (objects/markers/etc) to random points on a map. For the most part it works really well, but it'll occasionally pick a bad location and even stick players inside of rocks (often along the shoreline).


  12. I've installed the new version, and it looks great. Random question though. I've noticed if you pull up a weapon, you can now see the attachments available on the left side. Where is it parsing that list from? I've got my VAS setup to only show certain items/weapons, yet all accessories show up in that scroll menu, even if they're not listed in my config.

    The item does say, "This is restricted..." if you try to add it, but I'd rather people just don't see them in the first place. :)


  13. Yes, the original error message is a 'No Entry' Message, here's the messages from the .rpt:

    Warning Message: No entry 'C:\Users\MB\Documents\Arma 3 - Other Profiles\Meatball\mpmissions\[COOP02-10]Rock_and_a_Hard_Pla.Altis\description.ext/BTC_spectating_dialog/controls/respawn_button.colorFocused'.
    Warning Message: Size: '/' not an array
    Warning Message: Size: '/' not an array
    Warning Message: No entry 'C:\Users\MB\Documents\Arma 3 - Other Profiles\Meatball\mpmissions\[COOP02-10]Rock_and_a_Hard_Pla.Altis\description.ext/BTC_spectating_dialog/controls/respawn_button.colorBackgroundFocused'.
    Warning Message: Size: '/' not an array
    Warning Message: Size: '/' not an array
    

    I tried adding your new lines in at Line 12 and it actually crashes A3 to desktop on mission load with a "Config: some input after EndOfFile." error. The actual error message in the rpt is:

    File C:\Users\MB\Documents\Arma 3 - Other Profiles\Meatball\MPMissions\[COOP02-10]Rock_and_a_Hard_Pla.Altis\=BTC=_revive\=BTC=_respawn.h, line 12: '/BTC_r_shortcutButton.colorBackgroundFocused': Missing ';' prior '}'
    ErrorMessage: Config : some input after EndOfFile.
    

    I copied/pasted verbatim and I don't actually see a missing ; in your updates.


  14. Not sure if it's something I messed up, but since yesterday's upgrade to 1.10 has anyone else been getting a random error in missions when folks are knocked out and awaiting revive? Specifically I'm seeing:

    "No entry 'mpmissions\__CUR_MP.Altis\description.ext/BTC_spectating_dialog/controls/BTC_r_name_units.ComboScrollBar'."

    Otherwise we've found no errors in the script, just that pops up now on occasion.


  15. Is there anything special you have to do to get it working on a dedicated server. I used it in Arma2 years ago, but seem to be having JIP/Respawn issues on a dedicated server.

    Cheers

    GC

    Depends on how you set it up. Most of my tasks are initialized in the init.sqf, so they have no problem. For task updates/etc using triggers and such in mission I used the BIS_fnc_mp. An example is below:

    nul = [["task_0","Find Target","We have to find the target, look for him at location X!"],"SHK_Taskmaster_add",false] spawn BIS_fnc_mp;
    

×