Jump to content

meatball

Member
  • Content Count

    734
  • Joined

  • Last visited

  • Medals

Posts posted by meatball


  1. Hmm, that could work, but looks like it just adds/removes an addaction to take/drop a laptop that gets created/deleted. I want it to be an actual object the players can carry, drop and take from other players corpses if need be. I thought about just using a Parachute and changing the name to "Laptop Bag" which would work, but I believe can't change the name of the backpack without a mod.

    ---------- Post added at 17:14 ---------- Previous post was at 16:54 ----------

    Let me clarify what I want to do, as there may be other ways to do this. I want the players to have to find some sort of object. Pick that object up, carry it with them, be able to drop, or have the item taken from their inventory, and have that object fire a trigger if the player that is carrying the object enters the trigger.


  2. They are not alive at that point, it's just about to drop into the loop to spawn them. Here's the full script. I've discovered that the script actually works fine if I call it direct in an empty mission, so it's gotta be some sort of conflict in my mission I'm running, but I can't for the life of me even figure out how that could happen in that one line.

    /*
    			***		ARMA3Alpha HELI PARADROP v1.0 - by SPUn / lostvar	***
    
    				Spawns chopper which delivers paradrop group to scene
    
    	Calling the script:
    
    		default: 		nul = [this] execVM "LV\heliParadrop.sqf";
    
    		custom: 		nul = [spot, side, allowDamage, captive, distance, direction, flyby, fly height, jump distance,
    							group size, jump delay, open height, smokes, flares, chems, patrol, target, cycle, skills,
    							group, custom init, ID, MP] execVM "LV\heliParadrop.sqf";
    
    Parameters:
    
    spot 	= 	drop spot 		(name of marker or object or unit, or position array) 									DEFAULT: --
    side 	= 	1 or 2 or 3		(1 = west, 2 = east, 3 = independent)													DEFAULT: 2
    allowDamage = 	true/false	(allow or disallow damage for chopper)													DEFAULT: true
    captive 	= 	true/false 	(if true, enemies wont notice chopper) 													DEFAULT: false
    distance 	= 	number 		(from how far chopper comes from) 														DEFAULT: 1500
    direction 	= 	"random" or 0-360 (direction where chopper comes from, use quotes with random!) 					DEFAULT: "random"
    flyby	=	true/false		(true = chopper just flies thru target, false = stays still while dropping units)		DEFAULT: true
    fly height	= number 		(how high chopper flies)																DEFAULT: 200
    jump distance =	number 		(how many meters before target location units starts jumping out of heli)				DEFAULT: 150
    group size	= number 		(how many units is in para drop group)													DEFAULT: 8
    jump delay	= number 		(how many seconds is the delay between jumps)											DEFAULT: 0.5
    open height = number		(in which height units opens their parachutes)											DEFAULT: 50
    smokes	=	true/false		(will units throw cover smokes (on 10m height))											DEFAULT: false
    flares	=	true/false		(will units throw flares (on 30m height))												DEFAULT: false	
    chems	=	true/false		(will units throw chemlights (on 30m height))											DEFAULT: false
    patrol 	= 	true/false 		(if false, units wont patrol in any way <- handy if you set (group player) as *group) 	DEFAULT: true
    target 	= 	patrol target 	(patrolling target for infantry group, options:											DEFAULT: player
    						unit 	= 	units name, ex: enemyunit1
    						marker 	= 	markers' name, ex: "marker01" (remember quotes with markers!)
    						marker array = array of markers in desired order, ex: ["marker01","marker02","marker03"]
    						group	= 	groups name, ex: (group enemy1)	OR BlueGroup17
    						group array, ex: [(group player), (group blue2)]
    						["PATROL",center position,radius] = uses patrol-vD.sqf, ex: ["PATROL",(getPos player),150]										
    cycle 		= 	true or false (if true and target is array of markers, unit will cycle these markers) 				DEFAULT: false
    skills 		= 	"default" 	(default AI skills) 																	DEFAULT: "default"
    			or	number	=	0-1.0 = this value will be set to all AI skills, ex: 0.8
    			or	array	=	all AI skills invidiually in array, values 0-1.0, order:
    					[aimingAccuracy, aimingShake, aimingSpeed, spotDistance, spotTime, courage, commanding, general, endurance, reloadSpeed] 
    					ex: 	[0.75,0.5,0.6,0.85,0.9,1,1,0.75,1,1] 
    group 		= 	group name OR nil (if you want units in existing group, set it here. if this is left empty, new group is made) 	DEFAULT: nil
    custom init = 	"init commands" (if you want something in init field of units, put it here) 									DEFAULT: nil
    			NOTE: Keep it inside quotes, and if you need quotes in init commands, you MUST use ' or "" instead of ",
    				ex: "hint 'this is hint';"
    ID 			= 	number (if you want to delete units this script creates, you'll need ID number for them)						DEFAULT: nil
    MP			= 	true/false	true = 'drop spot' will automatically be one of alive non-captive players							DEFAULT: false
    
    EXAMPLE: 	nul = [player, 2, false, true, 1000, "random", true, 500, 200, 6, 1, 50, true, false, true, true, player, false, 0.75, nil, nil, 1,false] execVM "LV\heliParadrop.sqf";
    */
    if (!isServer)exitWith{};
    private ["_mp","_grp","_heliType","_men","_grp2","_center","_man1","_man2","_landingSpot","_side","_flyHeight","_openHeight","_jumpDelay","_jumperAmount","_heliDistance","_heliDirection","_flyBy","_allowDamage","_BLUmen","_OPFmen","_INDmen","_BLUchopper","_OPFchopper","_INDchopper","_landingSpotPos","_spos","_heli","_crew","_dir","_flySpot","_jumpDistanceFromTarget","_captive","_smokes","_flares","_chems","_skls","_cPosition","_cRadius","_patrol","_target","_cycle","_skills","_customInit","_grpId","_wp0","_wp1","_doorHandling"];
    
    //Extra settings:
    _doorHandling = true;
    //
    
    _landingSpot = if (count _this > 0) then {_this select 0};
    _side = if (count _this > 1) then {_this select 1}else{2};
    _allowDamage = if (count _this > 2) then {_this select 2}else{true};
    _captive = if (count _this > 3) then {_this select 3}else{false};
    _heliDistance = if (count _this > 4) then {_this select 4}else{1500};
    _heliDirection = if (count _this > 5) then {_this select 5}else{"random"};
    _flyBy = if (count _this > 6) then {_this select 6}else{true};
    _flyHeight = if (count _this > 7) then {_this select 7}else{200};
    _jumpDistanceFromTarget = if (count _this > 8) then {_this select 8}else{150};
    _jumperAmount = if (count _this > 9) then {_this select 9}else{8};
    _jumpDelay = if (count _this > 10) then {_this select 10}else{0.5};
    _openHeight = if (count _this > 11) then {_this select 11}else{50};
    _smokes = if (count _this > 12) then {_this select 12}else{false};
    _flares = if (count _this > 13) then {_this select 13}else{false};
    _chems = if (count _this > 14) then {_this select 14}else{false};
    _patrol = if (count _this > 15) then {_this select 15; }else{true;};
    _target = if (count _this > 16) then {_this select 16; }else{player;};
    _cycle = if (count _this > 17) then {_this select 17; }else{false;};
    _skills = if (count _this > 18) then {_this select 18; }else{"default";};
    _grp2 = if (count _this > 19) then {_this select 19; }else{nil;};
    _customInit = if (count _this > 20) then {_this select 20; }else{nil;};
    _grpId = if (count _this > 21) then { _this select 21;} else {nil};
    _mp = if (count _this > 22) then { _this select 22;} else {false};
    
    //Prepare functions:
    if(isNil("LV_ACskills"))then{LV_ACskills = compile preprocessFile "LV\LV_functions\LV_fnc_ACskills.sqf";};
    if(isNil("LV_vehicleInit"))then{LV_vehicleInit = compile preprocessFile "LV\LV_functions\LV_fnc_vehicleInit.sqf";};
    if(_mp)then{if(isNil("LV_GetPlayers"))then{LV_GetPlayers = compile preprocessFile "LV\LV_functions\LV_fnc_getPlayers.sqf";};};
    
    //Classnames:
    _BLUmen = ["B_Soldier_A_F","B_soldier_AR_F","B_medic_F","B_engineer_F","B_soldier_exp_F","B_Soldier_GL_F","B_soldier_M_F","B_soldier_AA_F","B_soldier_AT_F","B_officer_F","B_soldier_repair_F","B_Soldier_F","B_soldier_LAT_F","B_Soldier_lite_F","B_Soldier_SL_F","B_Soldier_TL_F","B_recon_exp_F","B_recon_JTAC_F","B_recon_M_F","B_recon_medic_F","B_recon_F","B_recon_LAT_F","B_recon_TL_F","B_soldier_AAR_F","B_soldier_AAA_F","B_soldier_AAT_F"];
    _OPFmen = ["O_Soldier_A_F","O_soldier_AR_F","O_medic_F","O_engineer_F","O_soldier_exp_F","O_Soldier_GL_F","O_soldier_M_F","O_soldier_AA_F","O_soldier_AT_F","O_officer_F","O_soldier_repair_F","O_Soldier_F","O_soldier_LAT_F","O_Soldier_lite_F","O_Soldier_SL_F","O_Soldier_TL_F","O_recon_exp_F","O_recon_JTAC_F","O_recon_M_F","O_recon_medic_F","O_recon_F","O_recon_LAT_F","O_recon_TL_F","O_soldier_AAR_F","O_soldier_AAA_F","O_soldier_AAT_F"];
    _INDmen = ["I_Soldier_A_F","I_soldier_AR_F","I_medic_F","I_engineer_F","I_soldier_exp_F","I_Soldier_GL_F","I_soldier_M_F","I_soldier_AA_F","I_soldier_AT_F","I_officer_F","I_soldier_repair_F","I_Soldier_F","I_soldier_LAT_F","I_Soldier_lite_F","I_Soldier_SL_F","I_Soldier_TL_F","I_soldier_AAR_F","I_soldier_AAA_F","I_soldier_AAT_F"];
    _BLUchopper = "B_Heli_Transport_01_F";
    _OPFchopper = "O_Heli_Light_02_unarmed_F";
    _INDchopper = "I_Heli_Transport_02_F";
    
    //Side related group creation:
    switch(_side)do{
    case 1:{
    	_center = createCenter west;
    	_grp = createGroup west;
    	if(isNil("_grp2"))then{_grp2 = createGroup west;}else{_grp2 = _grp2;};
    	_men = _BLUmen;
    	_heliType = _BLUchopper;
    };
    case 2:{
    	_center = createCenter east;
    	_grp = createGroup east;
    	if(isNil("_grp2"))then{_grp2 = createGroup east;}else{_grp2 = _grp2;};
    	_men = _OPFmen;
    	_heliType = _OPFchopper;
    };
    case 3:{
    	_center = createCenter resistance;
    	_grp = createGroup resistance;
    	if(isNil("_grp2"))then{_grp2 = createGroup resistance;}else{_grp2 = _grp2;};
    	_men = _INDmen;
    	_heliType = _INDchopper;
    };
    };
    
    paraTroops = _grp2;
    
    if(_mp)then{
    _landingSpot = call LV_GetPlayers;
    _landingSpotPos = getPos(_landingSpot call BIS_fnc_selectRandom);
    _landingSpot = _landingSpotPos;
    }else{
    //Check if target is marker/object/position
    if(_landingSpot in allMapMarkers)then{
    	_landingSpotPos = getMarkerPos _landingSpot;
    }else{
    	if (typeName _landingSpot == "ARRAY") then{
    		_landingSpotPos = _landingSpot;
    	}else{
    		_landingSpotPos = getPos _landingSpot;
    	};
    };
    };
    
    //Spawn chopper
    if(typeName _heliDirection == "STRING")then{_heliDirection = random 360;};
    _spos = [(_landingSpotPos select 0) + (sin _heliDirection) * _heliDistance, (_landingSpotPos select 1) + (cos _heliDirection) * _heliDistance, _flyHeight];
    _heli = createVehicle [_heliType, _spos, [], 0, "FLY"];
    _heli allowDamage _allowDamage;
    _crew = [_heli,_grp] call bis_fnc_spawncrew;
    if(_captive)then{
    _heli setCaptive true;
    { _x setCaptive true; } forEach units _grp;
    };
    //NOTE! This next line should make sure AI does fly where it's set to fly, BUT in recent stable release
    //AI sometimes acts weirdly while CARELESS, they might skip waypoints or domoves. 
    //_grp setBehaviour "CARELESS";
    
    //Count angle between chopper and target, and end spot for chopper
    _dir = ((_landingSpotPos select 0) - (_spos select 0)) atan2 ((_landingSpotPos select 1) - (_spos select 1));
    _flySpot = [(_landingSpotPos select 0) + (sin _dir) * _heliDistance, (_landingSpotPos select 1) + (cos _dir) * _heliDistance, _flyHeight];
    
    //Heli to go
    if(_flyBy)then{
    _wp0 = _grp addWaypoint [_landingSpotPos, 0, 1];
    [_grp,0] setWaypointBehaviour "CARELESS";
    [_grp,0] setWaypointCompletionRadius 60;
    _wp1 = _grp addWaypoint [_flySpot, 0, 2];
    [_grp,1] setWaypointBehaviour "CARELESS";
    [_grp,1] setWaypointCompletionRadius 60;
    }else{
    _wp0 = _grp addWaypoint [_landingSpotPos, 0, 1];
    [_grp,0] setWaypointBehaviour "CARELESS";
    [_grp,0] setWaypointCompletionRadius 60;
    };
    _heli flyInHeight _flyHeight;
    
    //Make heli & crew dissapear if something goes wrong or if heli is at its end spot
    [_heli,_grp,_flySpot,_landingSpotPos,_heliDistance] spawn {
    private ["_heli","_grp","_flySpot","_landingSpotPos","_heliDistance"];
    _heli = _this select 0;
    _grp = _this select 1;
    _flySpot = _this select 2;
    _landingSpotPos = _this select 3;
    _heliDistance = _this select 4;
    while{([_heli, _flySpot] call BIS_fnc_distance2D)>200}do{
    	if(!alive _heli || !canMove _heli)exitWith{};
    	sleep 5;
    };
    waitUntil{([_heli, _landingSpotPos] call BIS_fnc_distance2D)>(_heliDistance * .5)};
    { deleteVehicle _x; } forEach units _grp;
    deleteVehicle _heli;
    };
    
    //Wait till it's close enough
    waitUntil{([_heli, _landingSpotPos] call BIS_fnc_distance2D)<_jumpDistanceFromTarget};
    hint format["%1",paraTroops];
    //Create para group
    for "_i" from 1 to _jumperAmount step 1 do{
    _man1 = _men select (floor(random(count _men)));
    _man2 = _grp2 createUnit [_man1, [(getPos _heli) select 0,(getPos _heli) select 1, ((getPos _heli) select 2) - 3], [], 0, "NONE"];
    _man2 setPos [(getPos _heli) select 0,(getPos _heli) select 1, ((getPos _heli) select 2) - 3];
    if(typeName _skills != "STRING")then{_skls = [_man2,_skills] call LV_ACskills;};
    if(!isNil("_customInit"))then{ 
    	[_man2,_customInit] spawn LV_vehicleInit;
    };
    [_man2,_heli,_openHeight,_smokes,_flares,_chems] spawn{
    	private ["_man2","_heli","_openHeight","_para","_smokes","_flares","_chems","_smoke","_flare","_chem"];
    	_man2 = _this select 0;
    	_heli = _this select 1;
    	_openHeight = _this select 2;
    	_smokes = _this select 3;
    	_flares = _this select 4;
    	_chems = _this select 5;
    	waitUntil{((getPos _man2)select 2)<_openHeight};
    	_para = createVehicle ["NonSteerable_Parachute_F", position _man2, [], ((direction _heli)-25+(random 50)), 'NONE'];
    	_para setPos (getPos _man2);
    	_man2 moveInDriver _para;
    
    	if(_smokes)then{
    		waitUntil{((getPos _man2)select 2)<10};
    		_smoke = "SmokeShell" createVehicle (getPos _man2);
    	};
    	if(_flares)then{
    		waitUntil{((getPos _man2)select 2)<30};
    		_flare = "F_40mm_Red" createVehicle [(getPos _man2) select 0,(getPos _man2) select 1,0]; //Chemlight_red
    	};
    	if(_chems)then{
    		waitUntil{((getPos _man2)select 2)<30};
    		_chem = "Chemlight_red" createVehicle (getPos _man2);
    	};
    };
    _man2 allowFleeing 0;
    sleep _jumpDelay;
    };
    
    if(!isNil("_grpId"))then{
    call compile format ["LVgroup%1 = _grp2",_grpId];
    };
    
    //If it wasnt flyby, send heli to its end spot
    if(!_flyBy)then{ 
    _wp1 = _grp addWaypoint [_flySpot, 0, 2];
    [_grp,1] setWaypointBehaviour "CARELESS";
    [_grp,1] setWaypointCompletionRadius 60;
    };
    
    //Patrol stuff for para group (same as in reinforcementHeli, works but needs 'a bit' rework)
    if(_patrol)then{
    if(typeName _target == "ARRAY")then{ //TARGET is array
    	if((!((_target select 0) in allMapMarkers))&&(!((_target select 0) in allGroups)))then{
    		if((typeName (_target select 0)) == "STRING")then{
    			if((_target select 0) == "PATROL")then{ ////USE patrol-vD.sqf
    				{
    					_cPosition = _target select 1;
    					_cRadius = _target select 2;
    					nul = [_x,_cPosition,_cRadius,_doorHandling] execVM "LV\patrol-vD.sqf";
    				}forEach units _grp2;
    			};
    		};
    	}else{ //TARGET is array of Markers or Groups
    		{ 
    			_x setVariable ["target0",_target,false];
    			_x setVariable ["mDis0", 1000, false];
    			if(_cycle)then{
    				nul = [_x,true] execVM "LV\LV_functions\LV_fnc_follow.sqf";
    			}else{
    				nul = [_x,false] execVM "LV\LV_functions\LV_fnc_follow.sqf";
    			};
    			sleep 2;
    		}forEach units _grp2;
    	};
    }else{
    	if(_target in allMapMarkers)then{ /////TARGET is single Marker
    		{ _x doMove getMarkerPos _target; } forEach units _grp2;
    	}else{
    			{ ////TARGET is single Unit/Object
    				_x setVariable ["target0",_target,false];
    				_x setVariable ["mDis0", 1000, false];
    				nul = [_x] execVM "LV\LV_functions\LV_fnc_follow.sqf";
    			}forEach units _grp2;
    	};
    };
    }else{
    //If patrol is set to false, units will idle. Additionally you can set custom actions here:
    
    };
    


  3. Working with spunFin's heliParadrop script and running into an issue that appears to be mission related as opposed to script. Script basically spawns a chopper, flies by the players and drops paratroops on top of them.

    I've narrowed the problem down a BIS function call.

    hint format ["1 - %1 %2 %3",_grp2,_heli,_landingSpotPos];
    //Wait till it's close enough
    waitUntil{([_heli, _landingSpotPos] call BIS_fnc_distance2D)<_jumpDistanceFromTarget};
    hint format ["2 - %1 %2 %3",_grp2,_heli,_landingSpotPos];

    _grp2 is a previously created group for the paratroopers, _heli is a previously created group for the heli/crew, _landingSpotPos is the players location and _jumpDistanceFromTarget is the distance from the players the troopers are supposed to start spawning out of the chopper. With the hints I set up I'm seeing _grp 2 before the waituntil defined correctly (eg, 0 Bravo 4-3), but once the waitUntil completes and the 2nd hint fires, _grp is now <NULL-group>.

    I've got no idea why...I've tried change _grp2 to another Local variable name or even a global variable name with the same results. Any thoughts?

    ---------- Post added at 18:23 ---------- Previous post was at 16:39 ----------

    Yeah, I've really got no idea what the issue is now. I've even tried switching from a waitUntil to a while loop

    while{([_heli, _landingSpotPos] call BIS_fnc_distance2D)>_jumpDistanceFromTarget} do { sleep 1;};

    Same deal with the _grp2 being set to "<NULL-group>". Yet if I comment out that waitUntil (or while loop), I see the rest of the script run and the group name doesn't get changed.


  4. Your machine sounds like it should be fine. Are you running the client and the server on your same machine? How about the HC, where's that? In that latest patch I dropped the initial AI that gets loaded on the server down from about 81 to 55 or so. Can't really pull too many more than that as the others are all parts of objectives in way or the other, but hopefully that will help a bit.

    Other than that initial AI, most things won't spawn until the players are within about 1300m of the task location. Patrols in the non task locations are set to spawn only when the players are not at the task locations and will despawn when the players do get close to them. I'm using MAD Ambient Life for the civilian script and have looked at others including DCL, but none of the others ones allow you to do both civilian foot and vehicle traffic. I may try to write up something myself, but just haven't had the time.

    This is only the second mission I've made, so I'm still learning as I go, and if you have any other suggestions or thoughts, please keep them coming!


  5. v 0.91 Released!

    Some minor updates and additions. Please let me know if you have any feedback or find any bugs!

    Changelog

    - No longer need to search through the huge task list to find task information when looking at your map. Simply click near the marker on your map and the task information will be displayed!

    - Tweaked VAS Box to limit available gear to Blufor equipment.

    - Added a Parameter to allow disabling of the VAS. Will limit roles to default loadouts.

    - Continued balancing of AI in an attempt to remove some of the AI load from the server.

    - Added in a few 'surprises' for players.

    - Tweaked the out of bounds triggers.

    - Few task and mission fixes.

    Known Issues:

    - Players will occasionally lose their ability to revive or be revived unless they disconnect/reconnect to the server. Bug reported to BTC Revive script writer, Giallustio.

    - If you hijack a vehicle from a defended area and drive outside of the caching range, the vehicle may despawn. Bug reported to AI Spawn Script Pack writer, spunFin.

    See initial post for download link.


  6. HC didnt work so good. he spawnt about 90ai on the server, only 7 on the HC? performance wasnt so good, most had 12-25fps only. Hmm the weather perhaps ;) Normal that all tasks are active from the start?

    That's actually somewhat normal because there's about 81 or so AI that spawn by default on the server that are 'targets' or static defenders across the various tasks. All other AI that spawns should occur on the HC and you'll see that number go up and down as the defenders and patrols spawn in and out based on player location. There is one caveat, civilians. The Civilian script actually runs on the client side and seems to really put a hurting on the FPS. If you had Civilians enabled, I suggest you turn them off with the parameter available. I may see about shifting some of that original AI over to the HC, but since they aren't 'spawned', but are part of the mission itself, it's a bit more work, but doable. Also looking at a better way to handle Civilians in general.

    That being said, Force Recon does suck up CPU power because there are a _lot_ of things going on with a lot of AI/triggers, and the like. I've been cleaning things up and trying to make it run more efficiently as I'm finding stuff. I've been able to run 8-10 people on a server / hc that are both running on the same box (Core i5-3570K overclocked to 4.0 Ghz, 16 GB RAM) and the FPS/CPS stays above 48 on both of them the entire time but it took a lot of tweaking to get there. Here's a couple of server suggestions that will likely help your server performance overall and definitely seemed to help me out.

    1) If at all possible, run the latest 'performance binary' of the server executable. Lot of the changes in that build are supposedly going to be in the upcoming patched version of the server, so hopefully everyone will just start seeing the better performance.

    2) Run the server using the latest version of Fred's memory allocator if you have the RAM for it.

    3) Run the server and all clients with the '-nologs' startup switch.

    4) If the server/HC are running on the same box. Use processor affinity to assign them to different cores. You'll have to do that every time, but you can actually setup batch files to launch your exe's with a /affinity switch, just takes some experimenting to get it right.

    5) If you aren't already using it, run the Arma Server monitor to watch the actual performance on the server/client.

    Client CPU's and their game/video settings will also have a big impact on their perceived performance with the mission. I ran some tests with a machine running a Core i3-4330 and was barely getting 15-20 FPS. Swapping in an i7-4770K and not changing anything else on the machien bumped my FPS up to 30-35 with no other changes, so even if the server is humming along fine, Clients may be having issues on their own.

    Yes, all the objectives are supposed to be active at the mission start. That's part of the mission concept is you can jump in and just go do whatever tasks you feel like. Weather shouldn't have any impact on server performance other than rain just causes a bit of Video/CPU overhead on the clients in general. Try running weather 'clear' if you don't want to deal with rain.

    Hopefully you can get it working right, because my friends and I have been having a blast playing the mission for hours on end. Hopefully with upcoming game/server patches from BI to fix some performance issues and some tweaks on your side you can get it humming along great.

    Let me know how it goes and if you run across anything specific, please let me know!


  7. I should just be figuring everything out on my own instead.

    Welcome to the world of Arma scripting my friend. 95% of arma scripting is having to figure out stuff on your own. If you can't do that, especially when things are well documented, you might want to try your hand something else.

    Not trying to be blunt, but Arma scripting can be a bear, and if you can't deal with things not working the first time you try them, you're going to be in for a lot of disappointment.


  8. Have a few thoughts that players have given me and trying to figure out if there are some easy ways to handle them through scripting and want to solicit some ideas.

    1) NVG's - Selectable parameter to completely remove/disable all NVG's from players and AI.

    2) Orienteering - Selectable parameter to remove all GPS' as well as the marker that show the players location on the map. I know the map marker removal is built in if you choose 'veteran' skill level, but I'd like to be able to set that based on a parameter, regardless of the server skill setting.

    Anyone written anything to do something similar?


  9. Anyone ever figure out the 'random no revive' issue, where players will just randomly after being revived no longer be able to revive other players or be revived themselves? Doesn't seem to be tied to whether the player is JIP or not, just seems to randomly hit individuals on occasion.


  10. Where? I'm not seeing this range anywhere.

    You need to use Militarize/Fillhouse scripts in conjunction with the simpleCache script. But if you're looking for something that calls reinforcements from other zones, you can probably drop AI Spawn Script Pack as it does not do that.

    And as Iceman said, there are no "Super newbie friendly" AI caching/spawning scripts because Arma scripting in general just isn't super newbie friendly. You'll likely not find any script for anything that you'll just use 'out of the box' and you're going to need to understand the basics of scripting to implement and likely modify most scripts to fit your specific mission needs. I use 7 or 8 scripts in my missions, almost every one of which I've had to mod or tweak myself.


  11. That did the trick! Thanks again! In case anyone is trying to do this without using Taskmaster, here's the script you should be able to use with normally created tasks.

    // mapSelector Script by Meatball
    // v 0.2
    // Additional Credits to tryteyker, Genesis92x and Larrow
    //
    // This script allows your players to 'click' on their map and pull up the task
    // information for the closest mark to their click location without having to 
    // manually pull up the task list.
    //
    // This script setup _may_ interfere with other scripts that you may have that 
    // spawn or create actions based on single mouse clicks on the map and you may need
    // to adjust the script(s) and trigger(s) accordingly.
    
    // Setup: 
    // 1) Copy this script to your root folder of your mission. 
    //
    // 2) Create an in game trigger with the following setting:
    // Shape: Whatever you want
    // Timer: Countdown or Timeout works, just set all values to 0
    // Name: mapSelector
    // Text: Map Selector Trigger
    // Type and Activation : None
    // Repeatedly
    // Present
    // Condition: visibleMap
    // On Act.: nul = execVM "mapSelector.sqf";
    //
    // 3) Next, in the 'markerNames' array below, put in the names of all the markers related to your tasks.
    // Note: Your marker names _must_ match the task name exactly for the related markers/task or the script will not work.
    // For example: If you have a task named 'task1', the marker related to that task must also be named 'task1'.
    //
    
    markerNames = ["task1","task2","task3"];  // Set list of Marker names to check against.
    markerNum = count markerNames;  // Count the number of markers in the list
    closestMarkName = "dummy";  // Set dummy values for the closest marker and closest distance
    closestMarkDist = 1000000;
    
    // Reset Map to default view when opening
    processDiaryLink createDiaryLink ["Map",player,""];
    
    // Continuously check for mouse clicks while the map is open.
    while {visibleMap} do {
    onMapSingleClick {
    // Create temporary marker to use for comparison to markers in array.
    _tmpMark = createMarkerLocal ["tmpClick",_pos];
    
    // Loop through each marker in markerNames array and check distance between it and the mouse click.
    for [{_i=0},{_i<markerNum},{_i=_i+1}] do {
    distBT = (getmarkerpos "tmpClick") distance (getmarkerpos (markerNames select _i));
    	// If the distance between this marker and closer than the current closest, set it to be the closest.
    	if (distBT <= closestMarkDist) then {
    		closestMarkName = (markerNames select _i);
    		closestMarkDist = distBT;
    		};
    	};
    
    // Check to make sure that mouse click is at least within 500m of any marker before displaying Task info.
    if (closestMarkDist <= 500) then {
    processDiaryLink createDiaryLink ["Tasks", [closestMarkName,player] call bis_fnc_taskreal, ""];  
    };
    
    // Reset marker info/variables for next click.
    deletemarkerlocal "tmpClick";
    closestMarkName = "dummy";
    closestMarkDist = 1000000;
    sleep 0.5;
    };
    };
    


  12. Holy guacomole Larrow...that's it! How many cookies you want? :)

    ---------- Post added at 21:47 ---------- Previous post was at 21:28 ----------

    Hmm, definitely the right track. My test mission it works fine, but my bigger mission(s) I'm using SHK's taskmaster to create tasks for the players and it looks like it uses createsimpletask to create the tasks for the player during init.sqf. I wonder if I need to format that processDiaryLink line differently.

×