-
Content Count
3566 -
Joined
-
Last visited
-
Medals
Everything posted by iceman77
-
Created for those who know nothing and just need the bare minimum. For those who don't want to sift through redundant computer jargan just to start a dedicated server with a name and password just so they can test code. No 3rd party programs needed. STEP 1: Make a new folder in your Arma3 main (root) directory where Arma3 is installed and name it SERVERCFG STEP 2: Create a new file named configMain.cfg and place it in the SERVERCFG folder. STEP 3: Create a new file named configBasic.cfg and place it in the SERVERCFG folder. STEP 4: Copy and paste the below code(s) into the appropriate empty file(s) you just created. Make sure and save them. Make sure the file types ARE cfg. configMain.cfg configBasic.cfg STEP 5: Open up the official Arma3 launcher. The .exe for the official Arma3 launcher can be found in the Arma3 root directory (arma3Launcher.exe). STEP 6: Once that's open, click on the parameters button STEP 7: Click on advanced button STEP 8: Go down to [+] Host and click on it to activate the drop down menu STEP 9: Enter in the following information ( and check boxes ) like it is in the screen shot below STEP 10: Click the play button and wait for the server to be created. This may take a few moments. STEP 11: Once the server has started, un-check the server [ ] check box in the screen shot above. STEP 12: Click play. Once the game has started up go into the multiplayer server lobby and filter for your server If the server doesn't show up then try switching to LAN or you need to forward each port in the List Of Ports below to your router and/or firewall. Go to http://portforward.com/ to learn how to forward ports. List Of Ports: 2302 2303 2304 2305
-
What is the best FREE(Non Trial) PDF editor/creator? My google search did yield some results, it's just that I don't like downloading shit I'm not 100% on.
-
Official Example Mission: Note: ALiVE users need to select "Virtualize synced units only" in the ALiVE Virtual AI system module. Official fn_vehRespawn.sqf /* ---------------------------------------------------------------------------------------------------- File: fn_vehRespawn.sqf Author: Iceman77 Description: - Monitor a vehicle and "respawn" it if it's destroyed or abandoned - Can be used on vehicles - Set vehicle init upon respawn (optional) - Store and keep the vehicle's variable name automatically Parameter(s): - _this select 0: < OBJECT > - VEHICLE - _this select 1: < NUMBER > - ABANDONED DELAY IN SECONDS - _this select 2: < NUMBER > - DESTROYED DELAY IN SECONDS - _this select 3: < CODE > - FUNCTION THE VEHICLE CALLS UPON RESPAWN (OPTIONAL) Usage (Vehicle init Line): _nul = [ this, 120, 60, LVR_fnc_hunterInit ] spawn LVR_fnc_vehRespawn << have the vehicle call the custom LVR Function upon respawn _nul = [this, 20, 10, {_this setVehicleAmmo 0; _this setDammage 0.5;}] spawn LVR_fnc_vehRespawn; << Run code directly on the vehicle when it respawns _nul = [ this, 120, 60 ] spawn LVR_fnc_vehRespawn; << Default usage ---------------------------------------------------------------------------------------------------- */ // SERVER CODE if ( ! ( isServer ) ) exitWith {}; // SET SCOPE OF LOCAL VARIABLES private ["_veh","_abandonDelay","_destroyedDelay","_vehInit","_vehName","_vehDir","_vehPos","_vehtype","_abandoned","_dead"]; // PASSED ARGUMENTS ( OBJECT, ABANDONED DELAY, DESTROYED DELAY ) _veh = [_this, 0, objNull, [objNull]] call BIS_fnc_param; _abandonDelay = [_this, 1, 60, [0]] call BIS_fnc_param; _destroyedDelay = [_this, 2, 60, [0]] call BIS_fnc_param; _vehInit = [_this, 3, {}, [{}] ] call BIS_fnc_param; // STORE THE VEHICLES NAME, DIRECTION, POSITION AND TYPE _vehName = vehicleVarName _veh; _vehDir = getDir _veh; _vehPos = getPos _veh; _vehtype = typeOf _veh; // START LOOP TO MONITOR THE VEHICLE while { true } Do { sleep 1; // IF THE VEHICLE IS ALIVE AND CAN MOVE AND IS EMPTY THEN THE VEHICLE IS ABANDONED if ( ( alive _veh ) && { ( canMove _veh ) && { { ( alive _x ) } count ( crew _veh ) == 0 } } ) then { _abandoned = true; // COUNTDOWN THE ABANDONED DELAY - STALL SCRIPT HERE for "_i" from 0 to _abandonDelay do { // IF THE VEHICLE ISN'T EMPTY, OR IS DESTROYED, OR IF IT CAN'T MOVE THEN IT'S NOT ABANDONED SO EXIT THE COUNTDOWN EARLY - CONTINUE THE SCRIPT if ( { ( alive _x ) } count (crew _veh) > 0 || { !( alive _veh ) || { !( canMove _veh ) } } ) exitWith { _abandoned = false; }; sleep 1; }; // IF THE VEHICLE IS ABANDONED AND ISN'T CLOSE TO IT'S STARTING POSITION THEN DELETE IT AND CREATE A NEW ONE AT THE STARTING POSITION if ( ( _abandoned ) && { _veh distance _vehPos > 10 } ) then { deleteVehicle _veh; sleep 1; _veh = createVehicle [ _vehtype, _vehPos, [], 0, "CAN_COLLIDE" ]; _veh setPos [ ( _vehPos select 0 ), ( _vehPos select 1 ), 0 ]; _veh setDir _vehDir; _veh call _vehInit; if (_vehName != "") then { missionNamespace setVariable [_vehName, _veh]; publicVariable _vehName; }; }; }; // IF THE VEHICLE IS DESTROYED OR IF IT CAN'T MOVE THEN ITS DEAD if ( !( alive _veh ) || { !( canMove _veh ) } ) then { _dead = true; // COUNTDOWN THE DEAD DELAY - STALL SCRIPT HERE for "_i" from 0 to _destroyedDelay do { // IF THE VEHICLE ISN'T EMPTY, OR IF IT CAN MOVE ( HAS BEEN REPAIRED ) THEN IT'S NOT DEAD SO EXIT THE COUNTDOWN EARLY - CONTINUE THE SCRIPT if ( { ( alive _x ) } count ( crew _veh ) > 0 || { ( canMove _veh ) } ) exitWith { _dead = false; }; sleep 1; }; // IF THE VEHICLE IS DEAD THEN DELETE IT AND CREATE A NEW ONE AT THE STARTING POSITION if ( _dead ) then { deleteVehicle _veh; sleep 1; _veh = createVehicle [ _vehtype, _vehPos, [], 0, "CAN_COLLIDE" ]; _veh setPos [ ( _vehPos select 0 ), (_vehPos select 1 ), 0 ]; _veh setDir _vehDir; _veh call _vehInit; if (_vehName != "") then { missionNamespace setVariable [_vehName, _veh]; publicVariable _vehName; }; }; }; }; -------------------------------------------------------------- ALL CONTENT BELOW IS OPTIONAL ---------------------------------------------------------- Bonus LVR script (Not required) For Dynamic Sector Control Vehicle Respawns - Assign each vehicle to a sector - Vehicles respawn into the appropriate vehicle type based on which side owns the sector that the vehicle belongs to. - Think BF2 / BF3 vehicle respawn in conquest mode. - I can provide an example mission if needed. Installation & suggested usage: -Installation is essentially the same as normal LVR. Place a vehicle, and the usage code into it's init line. - Requires one empty marker per sector with the location's name as custom marker text. This is used to notify the players at which sector the vehicle has respawned, via notification message. So.. if I've a sector deemed power plant, I would place one empty marker near that sector's center, with any variable name, but with the text power plant. Personal Suggestions: -To be fair to all participants, the initial vehicle should be a civ vehicle. It can then respawn into a NATO/CSAT/INDEP vehicle (if applicable). - Follow the comment's instructions carefully and see how to assign a vehicle to a sector and more. - Keep it fair. Don't have an MRAP spawning for one side and an MBT for another. Take a look at the vehicle type array and the usage example in the comment. Options: - If you would like the vehicles to "refresh" even if they are at their initial spawn position (at the sector), remove && {(_veh distance _vehPos > 10)} from the _abandoned check. Otherwise, vehicle's that aren't damaged, and sitting at their initial spawn point, will not resapwn. Player's will need to A) Move the vehicle away or B) destroy the vehicle before a new one will respawn. It's really up to you. I personally like the distance check over the "refresh" option. Though the "refresh" option is nice too. Notes: -This version of LVR doesn't retain the vehicle's variable name. It doesn't support vehicle init respawn. It's essentially "old" style LVR, but converted for sectors. description.ext class CfgNotifications { class BCM_GENERIC_DEFAULT_MSG { color[] = {1,1,1,0.75}; colorIconPicture[] = {1,1,1,0.75}; colorIconText[] = {1,1,1,0.75}; title = "%1"; description = "%2"; iconPicture = "%3"; iconText = "%4"; duration = 7; }; }; sector_fn_vehrespawn.sqf /* ---------------------------------------------------------------------------------------------------- File: fn_vehRespawn.sqf Author: Iceman77 Description: - MODIFIED version of my LVR to accomodate dynamic vehicle spawning at sectors based on current owner's side - Monitor a vehicle and "respawn" it if it's destroyed or abandoned - Can be used on multiple vehicles Parameter(s): - _this select 0: < OBJECT > - VEHICLE TO MONITOR. - _this select 1: < NUMBER > - ABANDONED DELAY IN SECONDS. - _this select 2: < NUMBER > - DESTROYED DELAY IN SECONDS. - _this select 3: < OBJECT > - SECTOR THE VEHICLE BELONGS TO. - _this select 4: < ARRAY > - ARRAY OF STRINGS. VEHICLE CLASSNAMES. UPON REFRESH, ONE WILL BE CREATED BASED ON WHO OWNS THE SECTOR. SELECT 0 - DEFAULT VEHICLE TYPE SELECT 1 - OPFOR VEHICLE TYPE SELECT 2 - BLUFOR VEHICLE TYPE SELECT 3 - INDEPENDENT VEHICLE TYPE e.g.: ["defaultVehicleClassName","bluforVehicleclassName","opforVehicleClassName","independentVehicleClassName"] Usage Example (Vehicle init Line): _nul = [ this, 60, 60, sector1, [ typeOf this,"B_MRAP_01_hmg_F","O_MRAP_02_hmg_F","I_MRAP_03_hmg_F" ] ] spawn ICE_fnc_vehRespawn ---------------------------------------------------------------------------------------------------- */ if ( ! ( isServer ) ) exitWith {}; private ["_veh","_abandonDelay","_destroyedDelay","_sector","_vehArray","_defaultVehicle","_bluforVehicle","_opforVehicle","_independentVehicle","_vehDir","_vehPos","_vehType","_abandoned","_dead","_markerText","_displayName","_picture"]; _veh = [ _this, 0, objNull, [ objNull ] ] call BIS_fnc_param; _abandonDelay = [ _this, 1, 60, [ 0 ] ] call BIS_fnc_param; _destroyedDelay = [ _this, 2, 60, [ 0 ] ] call BIS_fnc_param; _sector = [ _this, 3, objNull, [ objNull ] ] call BIS_fnc_param; _vehArray = [ _this, 4, [ ], [ [ ] ] ] call BIS_fnc_param; _defaultVehicle = ( _vehArray select 0 ); _bluforVehicle = ( _vehArray select 1 ); _opforVehicle = ( _vehArray select 2 ); _indepVehicle = ( _vehArray select 3 ); _vehDir = getDir _veh; _vehPos = getPos _veh; _abandoned = false; _dead = false; while { true } Do { sleep 1; if ( ( alive _veh ) && { ( canMove _veh ) && { { ( alive _x ) } count ( crew _veh ) == 0 } } ) then { _abandoned = true; for "_i" from 0 to _abandonDelay do { if ( { ( alive _x ) } count (crew _veh) > 0 || { !( alive _veh ) || { !( canMove _veh ) } } ) exitWith { _abandoned = false; }; sleep 1; }; if ( _abandoned && {(_veh distance _vehPos > 10)}) then { deleteVehicle _veh; _vehType = switch ( _sector getVariable "owner" ) do { case West:{ _bluforVehicle; }; case East:{ _opforVehicle; }; case Independent:{ _indepVehicle; }; default { _defaultVehicle; }; }; sleep 1; _veh = createVehicle [ _vehtype, _vehPos, [], 0, "CAN_COLLIDE" ]; _veh addEventHandler ["getIn","_null=call BCM_fnc_crewRestrictions"]; _veh setDir _vehDir; _veh setPos [ ( _vehPos select 0 ), (_vehPos select 1 ), 0 ]; _displayName = getText (configFile >> "CfgVehicles" >> _vehType >> "displayName"); _picture = getText (configFile >> "CfgVehicles" >> _vehType >> "picture"); { if ((markerPos _x) distance _sector < 25 && (markerType _x == "EMPTY")) then { _markerText = markerText _x; }; } forEach allMapMarkers; [ [ "BCM_GENERIC_DEFAULT_MSG", [ "Vehicle Respawn", format ["A %1 has spawned at the %2", _displayName, _markertext], _picture, "" ] ], "BIS_fnc_showNotification", _sector getVariable "owner" ] call BIS_fnc_MP; }; }; if ( !( alive _veh ) || { !( canMove _veh ) } ) then { _dead = true; for "_i" from 0 to _destroyedDelay do { if ( { ( alive _x ) } count ( crew _veh ) > 0 || { ( canMove _veh ) } ) exitWith { _dead = false; }; sleep 1; }; if ( _dead ) then { deleteVehicle _veh; _vehType = switch ( _sector getVariable "owner" ) do { case West:{ _bluforVehicle; }; case East:{ _opforVehicle; }; case Independent:{ _indepVehicle; }; default { _defaultVehicle; }; }; sleep 1; _veh = createVehicle [ _vehtype, _vehPos, [], 0, "CAN_COLLIDE" ]; _veh addEventHandler ["getIn","_null=call BCM_fnc_crewRestrictions"]; _veh setDir _vehDir; _veh setPos [ ( _vehPos select 0 ), (_vehPos select 1 ), 0 ]; _displayName = getText (configFile >> "CfgVehicles" >> _vehType >> "displayName"); _picture = getText (configFile >> "CfgVehicles" >> _vehType >> "picture"); { if ((markerPos _x) distance _sector < 25 && (markerType _x == "EMPTY")) then { _markerText = markerText _x; }; } forEach allMapMarkers; [ [ "BCM_GENERIC_DEFAULT_MSG", [ "Vehicle Respawn", format ["A %1 has spawned at the %2", _displayName, _markertext], _picture, "" ] ], "BIS_fnc_showNotification", _sector getVariable "owner" ] call BIS_fnc_MP; }; }; }; nil -------------------------------------------------------------- Other projects related to LVR ---------------------------------------------------------- Not So Light Vehicle Respawn Framework ( BY LARROW ) - Tons of features
-
I want to avoid using a static size for the text control. What's the best approach to auto scale a multi-line rscText control based on the amount of text? Thanks.
-
Dialog Tutorial For Noobs [By A Noob]
iceman77 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
DIALOG TUTORIAL FOR NOOBS I've taken a while to create a dialog tutorial for those who don't know how or where to start making dialogs. It isn't intended for advanced users, or dialog wizards. If any dialog guru, or anyone else for that matter, that has experience with dialogs would like to contribute, please feel free to contact me for the word document, to edit or modify any way that's reasonable and / or appropriate to the guides style & intentions. Constructive criticism is always welcomed. Just refrain from the nit picking unless you intend to do something about it. IE; Editing the tutorial to make it what you think is appropriate. In any case, I hope some will find it useful. Please post any constructive or otherwise positive feed back here. Thanks. How to start: Download the PDF, the example mission & the GUI Editor Addon + Preview Mission. Open the tutorial pdf and go from there. TUTORIAL PDF: [ >>Download<< ] FOR ARMA2 ONLY (A3 Has this feature built in): GUI EDITOR & PREVIEW MISSION: [ >> DOWNLOAD << ] Resources. Use these instead of copy & pasting from my example mission. Description.ext Defines.hpp dialogs.hpp Note: It's really good to go through the process with the GUI editor. You can really gain a better understanding of how to put together a dialog, after the fact. You'll be able to create a dialog without the gui editor very easily :cool: Wiki Quote regarding the gui editor: Credits: Karel Moricky - GUI Editor Das Attourney - sharing things about dialogs in general. Mikie Boy - Showing how external hpps work Regards, David -
An action to put flipped vehicles back upright. Enjoy!! Example Mission: init.sqf if (!isDedicated) then { waitUntil {!isNull player && {time > 0}}; player addAction [ "Flip Vehicle", "FlipAction.sqf", [], 0, false, true, "", "_this == (vehicle _target) && {(count nearestObjects [_target, ['landVehicle'], 5]) > 0 && {(vectorUp cursorTarget) select 2 < 0}}" ]; Player AddEventHandler ["Respawn", { (_this select 0) addAction [ "Flip Vehicle", "FlipAction.sqf", [], 0, false, true, "", "_this == (vehicle _target) && {(count nearestObjects [_target, ['landVehicle'], 5]) > 0 && {(vectorUp cursorTarget) select 2 < 0}}" ]; }]; }; flipAction.sqf private ["_caller","_veh"]; _caller = _this select 1; _veh = nearestObjects [_caller, ["landVehicle"], 5] select 0; _veh setVectorUp [0,0,1]; _veh setPosATL [(getPosATL _veh) select 0, (getPosATL _veh) select 1, 0];
-
Dead bodies create weaponHolders (:confused:). However, when I use: waitUntil {!alive man1}; _weaponHolders = nearestObjects [player, ["weaponHolder","groundWeaponHolder"],50]; hint format ["%1 : %2", count _weaponHolders, _weaponHolders]; It returns 0 and an empty array after I kill the unit. I simply want to make an unarmed unit take a weapon from the nearest body and I figured this was the best place to start, as I can't simply use takeWeapon on a dead body any longer. As the primaryWeapon for a dead body in A3 for example, is an empty string and not the weapon the unit had before he died.
-
How do I get a vehicles damage while it's in a triggers list? I use a repair script, it works well enough, it just triggers even if the vehicle is at full health. I need it to exit the script if the vehicle has full health. I've tried using (Damage _unit == 0) as a condition so it could just exit the script, but it's not working. So how do I detect the list for damaged vehicles only? condition anyone present repeatable (vehicle player) in thislist activation {[_x] execVM "repair.sqf"} forEach thislist repair.sqf _unit = _this select 0; WaitUntil{(getPos _unit select 2)<2}; sleep 3; if((getPos _unit select 2)>2 || !(_unit in thisList) || [color="#0000FF"](Damage _unit == 0)[/color]) exitWith {}; _unit setFuel 0; _unit lock true; "Repair Center" hintC ["Service is initializing","Vehicle will be locked for your safety"]; sleep 3; _unit vehicleChat "Initializing PM sequence..."; sleep random 10;; _unit vehicleChat "Diagnosing Problems..."; sleep random 30; _unit vehicleChat "Repairing..."; sleep random 30; _unit setDammage 0; _unit vehicleChat "Rearming..."; sleep random 30; _unit setVehicleAmmo 1; _unit vehicleChat "Refueling..."; sleep 5; _unit vehicleChat "Finished..."; _unit setFuel 1; _unit lock false;
-
Here's a reinforcement script I made for a SP mission. It ended up being a project in itself. Initially I made the script to reinforce the enemy. However, it can also be used for friendly reinforcements just as easy. How It Works: -Spawns in a flying helicopter -loads it with an infantry group -heads to the AO and drops the group off in the general vicinity of the LZ Marker. Either by landing or by paradrop. -The infantry group will seek & destroy the nearest enemy(ies) or go into patrol mode. -The helicopter then flys off to [0,0,0] to be deleted. -The helo may choose to turn around and engage known enemies instead, if he sees it necessary. Notes: Intended for SP use, but should work on dedicated server aswell. No testing was done in a dedicated environment, though certain precaution(s) were taken while writing the script so that it may work on dedicated aswell. Hopefully :p Example Mission v1.1 ------------ CHANGE LOG ------------ v1.0 - initial release v1.1 - * Added paradrop parameter * The group will no longer see animals as enemies * Adjusted how the group detects enemies * Countless other revisions init.sqf /* ---------------------------------------------------------- See reinforcements.sqf comments for usage instructions ----------------------------------------------------------*/ call compile PreProcessFile "reinforcements.sqf"; [EAST, "spawnMrk", "LZMrk", 2, true, true, true, true, true] spawn TAG_fnc_reinforcements; reinforcements.sqf /* --------------------------------------------------------------------------------------------------------- File: reinforcements.sqf Author: Iceman77 Description: A function that will create a fully manned helo which inserts infantry units into an AO. Parameter(s): _this select 0 <side> - EAST, WEST, RESISTANCE _this select 1 <string> - Marker: (spawn position of the helo) _this select 2 <string> - Marker: (Landing Zone for the helo) _this select 3 <number> - Skill Setting: (1,2,3,4 >> 1 = Noob AI -- 4 = Deadly Ai) _this select 4 <bool> - SAD Mode: (True = Seek & destroy mode enabled. False = Patrol Mode Enabled) _this select 5 <bool> - Body Deletion: (True = delete dead Bodies of the reinforcements, False = let the dead bodies stay on the battlefield) _this select 6 <bool> - Cycle Mode: (True = ON, False = OFF) _this select 7 <bool> - Paradrop: (True = Enabled, False = Disabled) _this select 8 <bool> - Debug Mode: (True = Enabled, False = Disabled) Usage: _nul = [sIDE, "string", "string", number, bool, bool, bool, bool, bool] spawn TAG_fnc_reinforcements; >> _nul = [EAST, "spawnMrk", "LZMrk", 2, true, true, true, true, false] spawn TAG_fnc_reinforcements; << ---------------------------------------------------------------------------------------------------------*/ TAG_fnc_reinforcements = { if (!isServer) exitWith {}; //arguments definitions _side = _this select 0; _spawnMrk = _this select 1; _LZMrk = _this select 2; _skill = _this select 3; _sadMode = _this select 4; _bodyDelete = _this select 5; _cycleMode = _this select 6; _paraDrop = _this select 7; _debugMode = _this select 8; _heloCrew = createGroup _side; //set the scope of local variables that are defined in other scope(s), so they can be used over the entire script private ["_ranGrp","_helo","_infgrp"]; //Debug output of the passed arguments if (_debugMode) then { sleep 1; hint format ["Debug mode is enabled %1 (SP ONLY!!). Mapclick teleport, invincibility and marker tracking are enabled.", name player]; player globalChat format ["Side: %1", _side]; player globalChat format ["Spawn Position: %1 ", _spawnMrk]; player globalChat format ["Landing Zone: %1", _LZMrk]; player globalChat format ["AI Skill: %1", _skill]; player globalChat format ["SAD Mode: %1", _sadMode]; player globalChat format ["Body Deletion: %1", _bodyDelete]; player globalChat format ["Cycle Mode: %1", _cycleMode]; player globalChat format ["Debug Mode: %1", _debugMode]; }; //Side Check to spawn appropriate helicopter & cargo switch (_side) do { case WEST : { _ranGrp = ["BUS_InfSquad","BUS_InfSquad_Weapons"] call BIS_fnc_selectRandom; _helo = [getMarkerPos _spawnMrk, markerDir _spawnMrk, "B_Heli_Transport_01_F", WEST] call BIS_FNC_spawnVehicle; _infgrp = [getMarkerPos _spawnMrk, WEST, (configFile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> _ranGrp)] call BIS_fnc_spawnGroup; }; case EAST : { _ranGrp = ["OIA_InfSquad","OIA_InfSquad_Weapons"] call BIS_fnc_selectRandom; _helo = [getMarkerPos _spawnMrk, markerDir _spawnMrk, "O_Heli_Light_02_F", EAST] call BIS_FNC_spawnVehicle; _infgrp = [getMarkerPos _spawnMrk, EAST, (configFile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> _ranGrp)] call BIS_fnc_spawnGroup; }; case RESISTANCE : { _ranGrp = ["HAF_InfSquad","HAF_InfSquad_Weapons"] call BIS_fnc_selectRandom; _helo = [getMarkerPos _spawnMrk, markerDir _spawnMrk, "I_Heli_Transport_02_F", RESISTANCE] call BIS_FNC_spawnVehicle; _infgrp = [getMarkerPos _spawnMrk, RESISTANCE, (configFile >> "CfgGroups" >> "Indep" >> "IND_F" >> "Infantry" >> _ranGrp)] call BIS_fnc_spawnGroup; }; }; //Debug output of the helo + cargo if (_debugMode) then { player globalChat format ["Group Selection: %1", _ranGrp]; player globalChat format ["Helo Array: %1", _Helo]; player globalChat format ["Cargo Group: %1", _infGrp]; }; //Set the infantry groups skill levels switch (_skill) do { case 1 : { { _x setSkill ["general",1]; _x setSkill ["aimingAccuracy",0.2]; _x setSkill ["aimingShake",0.2]; _x setSkill ["aimingSpeed",0.7]; _x setSkill ["endurance",0.1]; _x setSkill ["spotDistance",0.1]; _x setSkill ["spotTime",0.1]; _x setSkill ["courage",1]; _x setSkill ["reloadspeed",0.1]; _x setSkill ["commanding",0.5]; } forEach units _infGrp; }; case 2 : { { _x setSkill ["general",1]; _x setSkill ["aimingAccuracy",0.3]; _x setSkill ["aimingShake",0.3]; _x setSkill ["aimingSpeed",0.7]; _x setSkill ["endurance",0.2]; _x setSkill ["spotDistance",0.2]; _x setSkill ["spotTime",0.2]; _x setSkill ["courage",1]; _x setSkill ["reloadspeed",0.2]; _x setSkill ["commanding",0.75]; } forEach units _infGrp; }; case 3 : { { _x setSkill ["general",1]; _x setSkill ["aimingAccuracy",0.3]; _x setSkill ["aimingShake",0.4]; _x setSkill ["aimingSpeed",1]; _x setSkill ["endurance",0.5]; _x setSkill ["spotDistance",0.3]; _x setSkill ["spotTime",0.3]; _x setSkill ["courage",1]; _x setSkill ["reloadspeed",0.75]; _x setSkill ["commanding",1]; } forEach units _infGrp; }; case 4 : { { _x setSkill ["general",1]; _x setSkill ["aimingAccuracy",0.4]; _x setSkill ["aimingShake",0.5]; _x setSkill ["aimingSpeed",1]; _x setSkill ["endurance",0.5]; _x setSkill ["spotDistance",0.5]; _x setSkill ["spotTime",0.5]; _x setSkill ["courage",1]; _x setSkill ["reloadspeed",1]; _x setSkill ["commanding",1]; } forEach units _infGrp; }; }; //Assign the crew to a group & assign cargo to the helo {[_x] joinSilent _heloCrew;} forEach crew (_helo select 0); {_x assignAsCargo (_helo select 0); _x moveInCargo (_helo select 0);} forEach units _infgrp; //Debug output of the total crew count (cargo counts as crew too) if (_debugMode) then {player globalChat format ["Helicopter Total Crew Count: %1", count crew (_helo select 0)];}; //Enable body deletion if the _bodyDelete parameter is passed as true if (_bodyDelete) then { {_x addMPEventhandler ["MPKilled",{[(_this select 0)] spawn TAG_fnc_deleteTrash}]} forEach crew (_helo select 0) + [(_helo select 0)]; if (isNil "bodyDeleteInit") then { bodyDeleteInit = 1; TAG_fnc_deleteTrash = { sleep 60; hideBody (_this select 0); sleep 5; deleteVehicle (_this select 0); }; }; }; if (isNil "debugInit") then { debugInit = 1; if (_debugMode) then { ["Teleport_ID", "onMapSingleClick", "TAG_fnc_teleport"] call BIS_fnc_addStackedEventHandler; TAG_fnc_teleport = { player setPos _pos; { _grpPos = [player, 10 + (random 15), random 360] call BIS_fnc_relPos; _x setPosATL _grpPos; } forEach units (group player); hintSilent format ["Moved to grid %1", mapGridPosition player]; }; }; }; //Find a flat position around the LZ marker & create an HPad there. _flatPos = [getMarkerPos _LZMrk , 0, 400, 10, 0, 0.3, 0] call BIS_fnc_findSafePos; _hPad = createVehicle ["Land_HelipadEmpty_F", _flatPos, [], 0, "NONE"]; //Debug output map markers private ["_mrkPos","_mrkLZ","_mrkHelo","_mrkinf","_mrkTarget"]; if (_debugMode) then { _color = [(((side leader _infGrp) call bis_fnc_sideID) call bis_fnc_sideType),true] call bis_fnc_sidecolor; _mrkPos = createMarker [format ["%1", random 10000], _flatPos]; _mrkPos setMarkerShape "ICON"; _mrkPos setMarkerType "mil_objective"; _mrkPos setMarkerSize [1,1]; _mrkPos setMarkerColor _color; _mrkPos setMarkerText "Actual LZ"; _mrkLZ = createMarker [format ["%1", random 10000], getMarkerPos _LZMrk]; _mrkLZ setMarkerShape "ICON"; _mrkLZ setMarkerType "mil_dot"; _mrkLZ setMarkerSize [1,1]; _mrkLZ setMarkerColor _color; _mrkLZ setMarkerText "LZ Area"; _mrkHelo = createMarker [format ["%1", random 10000], getPosATL (_helo select 0)]; _mrkHelo setMarkerShape "ICON"; _mrkHelo setMarkerType "o_air"; _mrkHelo setMarkerSize [1,1]; _mrkHelo setMarkerColor _color; _mrkHelo setMarkerText format ["%1", (_helo select 0)]; _mrkInf = createMarker [format ["%1", random 10000], getPosATL leader _infGrp]; _mrkInf setMarkerShape "ICON"; _mrkInf setMarkerType "mil_dot"; _mrkInf setMarkerSize [1,1]; _mrkInf setMarkerColor _color; [(_helo select 0), _infGrp, _mrkHelo, _mrkInf] spawn { while {{alive _x} count units (_this select 1) > 0 || canMove (_this select 0)} do { (_this select 2) setMarkerPos getPosATL (_this select 0); (_this select 3) setMarkerPos getPosATL leader (_this select 1); sleep 1; }; }; }; //Give the helicopter an unload waypoint onto the hpad if (!_paraDrop) then { _heloWp = _heloCrew addWaypoint [_hPad, 0]; _heloWp setWaypointType "TR UNLOAD"; _heloWp setWaypointBehaviour "CARELESS"; _heloWp setWaypointCombatMode "BLUE"; _heloWp setWaypointSpeed "FULL"; _heloWp setWaypointStatements ["true", "(vehicle this) LAND 'LAND';"]; //wait until the helicopter is touching the ground before ejecting the cargo waitUntil {isTouchingGround (_helo select 0) || {!canMove (_helo select 0)}}; {unAssignVehicle _x; _x action ["eject", vehicle _x]; sleep 0.5;} forEach units _infgrp; //Eject the cargo //wait Until the infantry group is no longer in the helicopter before assigning a new WP to the helicopter waitUntil {{!alive _x || !(_x in (_helo select 0))} count (units _infGrp) == count (units _infGrp)}; if (_debugMode) then {player globalChat format ["Helo Cargo Count: %1", {alive _x && (_x in (_helo select 0))} count (units _infGrp)];}; _heloWp = _heloCrew addWaypoint [[0,0,0], 0]; _heloWp setWaypointType "MOVE"; _heloWp setWaypointBehaviour "AWARE"; _heloWp setWaypointCombatMode "RED"; _heloWp setWaypointSpeed "FULL"; _heloWp setWaypointStatements ["true", "{deleteVehicle _x;} forEach crew (vehicle this) + [vehicle this];"]; } else { //disable collision to avoid deaths and setup the paradrop {_x disableCollisionWith (_helo Select 0)} forEach units _infGrp; (_helo select 0) flyInHeight 200; if (isNil "TAG_fnc_para") then { TAG_fnc_para = { { unAssignVehicle _x; _x action ["eject", vehicle _x]; sleep 1.5; _chute = createVehicle ["Steerable_Parachute_F", getPosATL _x, [], 0, "CAN_COLLIDE"]; _chute attachTo [_x,[0,0,0]]; detach _chute; _x moveIndriver _chute; } forEach assignedCargo (_this select 0); }; }; _heloWp = _heloCrew addWaypoint [_hPad, 0]; _heloWp setWaypointType "MOVE"; _heloWp setWaypointBehaviour "CARELESS"; _heloWp setWaypointCombatMode "BLUE"; _heloWp setWaypointSpeed "FULL"; _heloWp setWaypointStatements ["true", "nul = [(vehicle this)] spawn TAG_fnc_para;"]; _heloWp = _heloCrew addWaypoint [[0,0,0], 0]; _heloWp setWaypointType "MOVE"; _heloWp setWaypointBehaviour "AWARE"; _heloWp setWaypointCombatMode "RED"; _heloWp setWaypointSpeed "FULL"; _heloWp setWaypointStatements ["true", "{deleteVehicle _x;} forEach crew (vehicle this) + [vehicle this];"]; }; //wait until cargo is empty & if _sadMode is passed as true, then add a SAD WP on the nearest enemy.. else, go into patrol mode waitUntil {{!alive _x || !(_x in (_helo select 0))} count (units _infGrp) == count (units _infGrp)}; if (_debugMode) then { {deleteMarker _x;} forEach [_mrkLZ, _mrkPos]; }; if (_sadMode) then { if (_debugMode) then {player globalChat "Scanning for targets to enable SAD Mode";}; private "_nearestEnemies"; _nearestEnemies = []; _nearestMen = nearestObjects [getPosATL leader _infGrp, ["Man"], 1000]; { if ( (side _x getFriend (side leader (_infGrp))) < 0.6 && {side _x != CIVILIAN} ) then { _nearestEnemies = _nearestEnemies + [_x]; }; } forEach _nearestMen; if (count _nearestEnemies > 0) then { _enemy = _nearestEnemies call bis_fnc_selectRandom; _attkPos = [_enemy, random 100, random 360] call BIS_fnc_relPos; _infWp = _infGrp addWaypoint [_attkPos, 0]; _infWp setWaypointType "SAD"; _infWp setWaypointBehaviour "AWARE"; _infWp setWaypointCombatMode "RED"; _infWp setWaypointSpeed "FULL"; if (_debugMode) then { player globalChat "Target Found. Setting SAD waypoint"; _colorTarget = [(((side _enemy) call bis_fnc_sideID) call bis_fnc_sideType),true] call bis_fnc_sidecolor; _mrkTarget = createMarker [format ["%1", random 10000], _attkPos]; _mrkTarget setMarkerShape "ICON"; _mrkTarget setMarkerType "mil_dot"; _mrkTarget setMarkerSize [1,1]; _mrkTarget setMarkerColor _colorTarget; _mrkTarget setMarkerText "SAD Target Area"; }; } else { [_infGrp, getPosATL (leader _infGrp), 200] call BIS_fnc_taskPatrol; if (_debugMode) then {player globalChat "No targets found. Patrol mode enabled";}; }; } else { [_infGrp, getPosATL (leader _infGrp), 200] call BIS_fnc_taskPatrol; if (_debugMode) then {player globalChat "Patrol Mode";}; }; // IF _cycleMode is passed as true, then re-run the function (this function!), else do nothing. if (_cycleMode) then { waitUntil {{alive _x} count units _infgrp + [(_helo select 0)] == 0}; if (_debugMode) then { player globalChat "Patrol and helicopter dead"; {deleteMarker _x;} forEach [_mrkHelo, _mrkinf, _mrkTarget]; }; sleep 10; if (_debugMode) then {player globalChat "New Reinforcements created";}; [_side, _spawnMrk, _LZMrk, _skill, _sadMode, _bodyDelete, _cycleMode, _debugMode] spawn TAG_fnc_reinforcements; }; // Function End }; All feedback is welcome. Let me know if the problem is in SP or (MP) dedicated server and explain any problems you are having.
-
===================== Downloads: ===================== ====================== Author: ====================== - Iceman77 ====================== Description: ====================== - A clean cut UI that allows you to create vehicles - Users can adjust vehicle type creation time - Users can adjust which side's vehicles will be displayed. e.g.; The player's side only. Or west, or east, or independent, or... any combination of sides. - Option to create manned vehicles - Option to create vehicles already flying - Option to move the player into the first available position upon creation ( driver, crew, cargo etc etc) ====================== Version: ====================== - 1.3a ====================== INSTALLATION : ====================== - Merge the contents of the vSys mission folder into yours. - Changes can be made in the fn_varsInit.sqf to customize VSYS to the users needs ====================== CHANGELOG: ====================== v1.0a - release v1.1a - Fixed scrollBar error. listScrollBar is now being used rather than the apparently depreciated scrollBar. - Added action via cfgFunctions rather than through init.sqf. Less for the mission editor to do. v1.2a - Re-wrote the entire system. - No more parachute. - Users can set vehicle creation time for specific types easily. From instant* (2sec) to whatever delay the user desires ( fn_varsInit.sqf ). - Added the option to create the vehicle with a crew. - The previous vehicle doesn't have to be destroyed before you can request a new one. v1.3a - Users can now define which side's vehicles can be displayed (fn_varInit.sqf). - Changed the position (method) for vehicle spawn. Now relative to the object the action is assigned to rather than the player. - Localized text for all languages via stringtable.xml. - Added comments to everything so advanced users can easily navigate the blocks of code in any .sqf file - Added the missing VSYS_DELAY_SUPPORT variable to fn_varsInit.sqf. - Added "flying" option (check box) to spawn the aircraft flying. Auto defaults to ground spawn if tried with ground vehicles. - Added "GetIn" option ( Check Box ) to allow the player to automatically be moved into the vehicle's first available position, upon creation ( if possible ). - Optimized code a bit ( mainly readability ) with control macros - Text should now be scaling dynamically ( ?? ) - Tweaked UI colors ( mainly opacity ) ====================== CREDITS: ====================== Translators ( stringtable.xml ): -Mariodu62 -Syncie -Lepletier -Schatten -[CSLA]LUKI -Rydygier -AWC_Chief_Wiggum -Rapax
-
Addon Version v1.5b Scripted Version v1.5b This is my very first attempt at an addon. It's a client side addon that displays the users health, fatigue, fps, and heading. Current Addon Version : 1.5 Current Scripted Version : 1.5 Release Date :11 - 14 - 2013 ====================== CONTACT INFORMATION : ====================== Tinkerer's Repository ====================== REQUIRED ADDONS: ====================== Addon version only - @CBA ====================== DESCRIPTION : ====================== Status Hud simply displays the users health, fatigue, fps & their heading in the lower right corner of the screen. ====================== INSTALLATION : ====================== Addon Version: Put the @status_hud mod folder into your main arma directory (same directory the arma3.exe is in). Go into steam, right click on Arma3 & go to properties. Click 'Set launch options' & put -mod=@CBA_A3 -mod=@status_hud into the text field. Or... Click on the following URL to view a more in-depth mod installation tutorial : http://www.armaholic.com/forums.php?m=posts&q=20866 Scripted Version: place the contents of the mission folder into your own. * Regarding the scripted version: I've no control over how or where other (users) UI scripts define rscTitles. There may be conflicts if the 'standard' method wasn't employed. For more info on how to work around this possible issue see this post. ====================== DISCLAIMER : ====================== I take no responsibility for (im)possible damage to your game/system that may be caused by installation of this Addon. This Addon is also prohibited to be used in any commercial product. ====================== CHANGELOG: ====================== v1.0b - release v1.1b - Create the display in it's own layer so it doesn't interfer with other displays. - Added scripted Version v1.2b - Assigned better idc's to controls as to not conflict with other UI's idc's. - Tightened the image / text alignment up. - Cleaned up some code & took out un-needed commands v1.3b - Added fatigue v1.4b - Fixed Signatures :confused: v1.5 - optimized code a little - icons now keep their original aspect ratio
-
For on the fly rearming out in the field or at base !!! ====================== Download: ====================== ====================== Author: ====================== Iceman77 ====================== DESCRIPTION : ====================== - Simple rearming UI that provides quick and efficient rearming - Displays useful ammunition based on your current weapons - Displays misc ammunition such as hand grenades, mines, smoke, chem lights etc ====================== RECOMMENDED USAGE: ====================== - Out in the field when you need to rearm quickly ====================== INSTALLATION : ====================== - Extract / Merge the contents of the VRH mission folder into yours. The action to use VRH will automatically become available to the player when he or she interacts with any sort of crate. ====================== CHANGELOG: ====================== v1.0a - release v1.1a - Added grenades, chemlights and mines v1.2a - - Changed control type for the header - Removed un-needed controls - removed msg toggle feature / function ( Is it really needed ?? ) - Optimized and cleaned up code
-
Hi. How do I get my current forum avatar (.png) to act like a .png? (lol??) As you can see it now has a white BG when I upload it here. Thanks.
-
Coders and aspiring coders alike have come together on teamspeak3 to hangout and socialize. All are welcome to participate. This is advantageous for a few reasons. Here is what we can offer one another: * Socialize with like minded individuals. * Learn from one another directly. * Learn by overhearing useful information. * Layed back, but fun environment. We've alot of laughs in here. * Combined we've a diverse array of coding skills and "specialties". * No strings attached. Hang with your "gaming" clan too. Come kick it in the lounge whenever you like. Who should consider hanging out in the Community Scripter's Lounge?? * Any person who enjoys writing, talking about, or sharing code * Newbies who are learning to write their own code Who currently hangs out in the Community Scripter's Lounge ?? * J-Shock * DreadedEntity * Tajin * Tankbuster * Heeeere's Johnny! aka WaltenBerg * MistaParadox * Das Attorney Please send J-Shock or DreadedEntity a PM for their Team Speak information.
-
Why not use an active text control?
-
Lootspawner, configurable building loot system
iceman77 replied to na_palm's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If the author is using weaponHolders he needs to use weaponHolderSimulated. -
A wiz?! LMAO. I always did what I could to make shit work, and I never minded sharing what little knowledge I had with others. Anyhow, I'm glad I could help.
-
DLSR (Digital Loadout System Rearmed)
iceman77 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
DLSR is a menu that lets the player customize their current loadout and more. Downloads: Features: * Pulls vanilla and addon gear from the config * BlackList any item for any side(s) * Manage persistent loadouts. Including creating - saving, loading, renaming and deleting loadouts * Copy current loadout to clipboard which can then be pasted in any unit's init line or script. * Official weapon's descriptions * PIP Camera for fun Installation (Advanced users): * Merge the contents of the DLSR.VR mission folder into your own mission. Installation (Beginners): 1) Copy and paste the DLSR folder that is inside the DLRS.VR mission folder into your own mission's main directory. 2) If you don't already have a description.ext in your mission's main directory then all's you need to do is copy and paste the description.ext from the DLSR.VR mission folder into your own mission's main directory. If you already have a custom description.ext, then copy and paste the mandatory contents of the DLSR.VR description.ext into your own description.ext Mandatory description.ext contents are #include "DLSR\DIALOG\defines_GLOBAL.hpp" class CfgFunctions { #include "DLSR\functions\functions.hpp" }; Note: If you are already utilizing class CfgFunctions from another script, then copy and paste #include "DLSR\functions\functions.hpp" into your existing cfgFunctions class to avoid issues / CTD. Credits: Larrow: LO - persistent loadouts functions -
DLSR (Digital Loadout System Rearmed)
iceman77 replied to iceman77's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank Larrow. He wrote the CTC function aswell as the save/load loadout functions. In any case, I'm glad someone used it in some capacity. Cheers. Bottoms up. -
You need to create a display using cutRsc. Google KK's GUI blog. Also take a look @ http://forums.bistudio.com/showthread.php?184732-LWSH-A-simple-HUD-to-monitor-the-player-s-health-and-fatigue Not much to it. Just make sure you create the display on it's own layer or you'll be back here asking why other displays are cancelling yours.
-
Light Vehicle Respawn Script
iceman77 replied to iceman77's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah it doesn't matter about how many threads and loops. I think it matters about what's going on inside them. In LVR's case, it's alot of times either just sleeping or creating a new vehicle every now and again, after some pretty soft evaluations. In any case I'll post yours here for everyone to use since it's more efficient. Everyone can use it instead of LVR, because hey I don't even have the time to write code anymore. Not that I could even if I wanted to since I stay drunk. Anyhow... Here's MDCCLXXVI's leet vehicle respawn pseudo code. _arrayOfVehicleData = [ [veh1,vehicledata,etc], [veh2,vehicledata,etc], [veh3,vehicledata,etc] ]; while {TRUE} do { { _index = _arrayOfVehicleData find _x; _vehicleData = _arrayofVehicleData select _index; _vehicle = _vehicleData select 0; _othershit = _vehicleData select whatever if (!alive _vehicle) then { _vehicle = createvehicle [] _vehicleData = [_vehicle,vehicledata,etc]; _arrayOfVehicleData set [_index,_vehicleData]; } else { if (abandoned _vehicle) then { _vehicle setPos [] }; }; } count _arrayOfVehicleData; }; Look ma no sleep!! (you know instead of no hands!) ps; if you wont release a public version of yours why are you on here pm'n me about how to write it? Post a working version and then get back with me. Or not. Frankly I don't give a damn. Just saying. -
Looking for Developers
iceman77 replied to KingAlmond's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Time to get dangerous then isn't it? :) -
How to hide respawn tent markers?
iceman77 replied to groshnak's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Right... But why should the opposition be able to see where your camp is located? They should have to find it... Even if it is working as intended, it needs to be changed IMO... If i were the OP I'd make a request ticket... My 2c... ---------- Post added at 12:33 ---------- Previous post was at 12:08 ---------- Here's some shitty pseudo code. Forgive me as I can't test anything or I would provide exactly what the OP needs. But this could give an idea. Someone else should be able to run with it and provide something worth a shit. Anyhow, after camp placement... private "_tent"; _tent = nearestObjects [theMan, ["TENT_CLASS"], 25] select 0; { private "_marker"; _marker = _x; if ( ( markerPos _marker ) distance _tent < 5 && { ( ( markerType _marker ) isEqualTo "THE_MARKER_TYPE" ) } ) exitWith { { if ((side _x) in _badSidesArray) then { deleteMarker _marker; }; } forEach playableUnits; }; } forEach allMapMarkers; -
How to hide respawn tent markers?
iceman77 replied to groshnak's topic in ARMA 3 - MISSION EDITING & SCRIPTING
May be time to make a ticket then? -
Lootspawner, configurable building loot system
iceman77 replied to na_palm's topic in ARMA 3 - MISSION EDITING & SCRIPTING
... .