Jump to content

Search the Community

Showing results for tags 'Scripting'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 259 results

  1. GEORGE FLOROS GR

    Scripting General

    Scripting General Information : Feel free to share and discuss , about Ravage Scripting and Scripting general. # Follow the same form , as the first Post please . A list with the certain page , will be here available. I also suggest to follow , the BIS Forum Members below , who really help and share their work and knowledge : # the list is off course on random. https://forums.bohemia.net/profile/900806-pierremgi/ https://forums.bohemia.net/profile/770615-larrow/ https://forums.bohemia.net/profile/832107-grumpy-old-man/ https://forums.bohemia.net/profile/773718-hazj/ https://forums.bohemia.net/profile/842941-davidoss/ https://forums.bohemia.net/profile/906542-schatten/ https://forums.bohemia.net/profile/759255-mrcurry/ https://forums.bohemia.net/profile/792430-dedmen/ I thank personally and public , this members , for everything so far. List : 1. Custom zombie spawner script, that works alo in USS Liberty or USS Freedom == SOLVED 2. How to add a Custom texture respawnable uniform on players or units == HOW TO 3. Ravage Zed Detector == HOW TO 4. How to create a trigger that counts the number of zombies in its radius and spawns a new horde if there are too few == SOLVED , +2nd
  2. Hello there, I have been trying to delete an ammo crate with sqf if its inventory is empty (the one I'm using is "Box_NATO_Wps_F"). But I can't seem to figure it out. Any and all help is appreciated thanks :). I have tried things such as using getWeaponCargo and counting it to see if I can check if the array is empty but it always stays at 2 even if there is nothing inside the box.
  3. Next to already revealed an known https://community.bistudio.com/wiki/Category:Arma_3:_New_Scripting_Commands_List There are more script commands now :) + fixed http://feedback.arma3.com/view.php?id=12324 + only discussion related to new or changed Arma 3 Beta/Dev Scripting allowed
  4. guys, i tried to find help in exile mod forums but people there dont seem to be as much active as you guys are here. Im posting here to find some help cuz im stuck with this problem for more than a week. here it is: So guys, ive made a custom loot generator for DMS boxes. it runs great on arma 3 editor, but after a weak trying to make it generate loot for DMS boxes i gave up and came here. The thing is, i saw on DMS's fn_fillCrate.sqf script that i can create a custom function and make it spawn the loot for me. But the comments from Defent were not very clear, where should i put my script for dms to read? should i declare it in DMS's config.cpp like its vanila functions? how should i parse the function name in the _crate_loot_values1 variable? a string? is there a pattern for me to create my custom file for my function? Any captain out there to help me with this? I REALLY NEED HELP! ive made the hard part to program how i want the loot to be generated, i know how should i return my function to DMS's accepted pattern. I just dont know where should i put my function, and how DMS is expecting me to call it. DMS's instructions: For example, _weapons could simply be a number, in which case the given number of weapons are selected from "DMS_boxWeapons", or an array as [_wepCount,_weps], where _wepCount is the number of weapons, and _weps is an array of weapons from which the guns are randomly selected. OR: [ _customLootFunctionParams, _customLootFunction ] In this case, "_customLootFunctionParams" is passed to "_customLootFunction", and the custom loot function must return the loot in the form: [ [ weapon1, weapon2, [weapon_that_appears_twice,2], ... weaponN ], [ item1, item2, [item_that_appears_5_times,5], ... itemN ], [ backpack1, backpack2, [backpack_that_appears_3_times,3], ... backpackN ] ] this DMS instructions are located in a3_dms/scripts/fn_fillCrate.sqf ive tried to insert my function like the vanilla functions of DMS in the folder "/scripts" but i got no success, the missions wont spawn ­čśĽ DMS error log says the mission spawned successfully with no errors (but it didnt) thank you guys!
  5. Hey Guys! I would need your help regarding a piece of script that I'm trying to write. I try to simulate the player returning several items to an AI in order to complete a task. The intended behavior of this script is: _Check for a specific numbers of Items in the player's inventory ex.: 5 x firstAidkit, 1 x ToolBox, 5 x AntiRad etc, etc... _Remove the items that have been requested to complete the task _Set the task RECOVER ITEM to SUCCEEDED _Remove the "Give Item" action (quest_22) _Save the game _Add an Item to giftbox2 This is what I came out with : _questitems1 = [["FirstAidKit",5],["rvg_antiRad",5,6],["rvg_money",1000,1],["rvg_canisterFuel",1,20],["rvg_toolkit",1,3],["rvg_purificationTablets",5,6]]; if (_questitems1 in magazines player) then { player removeMagazine _questitems1; } else { if (_questitems1 in (backpackItems player)) then { player removeItemFromBackpack _questitems1; } else { if (_questitems1 in (vestItems player)) then { player removeItemFromVest _questitems1; } else { if (_questitems1 in (uniformItems player)) then { player removeItemFromUniform _questitems1; } else { if (_questitems1 in weapons player) then { player removeWeaponGlobal _questitems1; } else { player removeItem _questitems1; }; }; }; }; }; ["RECOVER ITEM", "SUCCEEDED",true] spawn BIS_fnc_taskSetState; quest2 removeAction quest_22; sleep 3; saveGame; quest2 addAction ["Talk to Theo",{cutText ["<t size='2'>Thanks for blablabla.</t>","PLAIN", -1, true, true],nil,1,true, true,"","true",3,false}]; giftbox2 addItemCargo ["Item_B_UavTerminal", 1]; I'm missing something in my nested statements as I tried to get it work with a unique item at first and it doesn't work. I'm not sure about the use of multi-dimensional array here but I don't see/know other ways to set differrent item with different quantities under one array. Some of the relevant pages I've checked out so far: https://community.bistudio.com/wiki/Array#Multi-dimensional_arrays https://community.bistudio.com/wiki/Control_Structures https://forums.bohemia.net/forums/topic/145490-check-player-for-a-item/ http://killzonekid.com/arma-scripting-tutorials-arrays-part-1/ I've been looking at it for too long now so I could use a fresh pair of eyes. Thank you. UPDATE: The solution to my problem. { if ((_x select 0) in magazines player) then {for "_i" from 1 to (_x select 1) do { player removeMagazine (_x select 0)}; } else { if ((_x select 0) in items player) then {for "_i" from 1 to (_x select 1) do { player removeItem (_x select 0)}; } else { if ((_x select 0) in backpackItems player) then { for "_i" from 1 to (_x select 1) do { player removeItemFromBackpack (_x select 0)}; } else { if ((_x select 0) in vestItems player) then { for "_i" from 1 to (_x select 1) do { player removeItemFromVest (_x select 0)}; } else { if ((_x select 0) in uniformItems player) then {for "_i" from 1 to (_x select 1) do { player removeItemFromUniform (_x select 0)}; } else { if ((_x select 0) in weapons player) then {for "_i" from 1 to (_x select 1) do { player removeWeaponGlobal (_x select 0)}; }; }; }; }; }; }; }foreach [["FirstAidKit",5],["rvg_antiRad",5],["rvg_money",1000],["rvg_canisterFuel",1],["rvg_toolkit",1],["rvg_purificationTablets",5]]; Enjoy!
  6. So guys here is the problem, i might be taking your time for something very stupid like syntax error or something like this, since im new to scripting in Arma. But the problem is: I have a EXIlLE server, and i use a very customized DMS mission system. In most cases, its great standard config variables give me what i need to make what i want. But since im trying to do some kind of RPG in exile, i need more things that depends on players lucky. In most cases Im developing very simple systems that spawn everything with some kind of probability, like vehicles and, missions and other stuff. Now im trying to do this in the loot of DMS missions and im looking to this code for like, 2 days! ive already read all the arma wiki documentation to check, double-check, triple-check, infinite-check my logic and syntax and i cant find the error. every time that i start the sever with my script it wont spawn ANY mission. even ZCP stop spawning. im using in this case "sniper camp" mission: here is my code for dynamic loot (not using selectRandomWeighted at the moment for testing proposes): _weaponCountSG = round (random 4); if (_weaponCountSG == 0) then {_weaponCountSG = 1}; _weaponsSG = ["srifle_DMR_01_F","srifle_EBR_F","srifle_DMR_07_blk_F","srifle_DMR_07_hex_F","srifle_DMR_07_ghex_F","Exile_Weapon_DMR","Exile_Weapon_SVD","Exile_Weapon_SVDCamo","Exile_Weapon_CZ550"]; _spawnWeaponsSG = []; _spawnMagSG = []; _spawnListSG = []; for [{_sgW = 1}, {_sgW <= _weaponCountSG}, {_sgW = _sgW + 1}] do { _selectedWeaponSG = selectRandom _weaponsSG; _spawnWeaponsSG = _spawnWeaponsSG + _selectedWeaponSG; _magCountSG = round (random 3); if (_magCountSG == 0) then {_magCountSG = 1}; { _selectedMagSG = getArray (configFile >> "CfgWeapons" >> _selectedWeaponSG >> "magazines"); for "_sgM" from 1 to _magCountSG do { spawnMagSG = _spawnMagSG + _selectedMagSG; }; }forEach _spawnWeaponsSG; //other syntax that ive tried to do the same stuff /*for [{_sgM = 1}, {_sgM <= _magCountSG}, {_sgM = _sgM + 1}] do { private _selectedMagSG = getArray (configFile >> "CfgWeapons" >> _selectedWeaponSG >> "magazines"); _spawnMagSG = _spawnMagSG + _selectedMagSG; };*/ }; so the complete code for "Sniper Camp" in my server was (in case you did not saw anything wrong up there (search for "SpaceGhost" to see all my modifications): /* Sniper Camp Mission with new difficulty selection system Hardcore has persistent vehicle based on work by Defent and eraser1 easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk */ private ["_num", "_side", "_pos", "_OK", "_difficulty", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty"]; // For logging purposes _num = DMS_MissionCount; // Set mission side (only "bandit" is supported for now) _side = "bandit"; // This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos. // It also allows anybody to modify the default calling parameters easily. if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then { _this = [ [10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists], [ [] ], _this ]; }; // Check calling parameters for manually defined mission position. // You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass] _OK = (_this call DMS_fnc_MissionParams) params [ ["_pos",[],[[]],[3],[],[],[]], ["_extraParams",[]] ]; if !(_OK) exitWith { diag_log format ["DMS ERROR :: Called MISSION nedsnipercamp_mission.sqf with invalid parameters: %1",_this]; }; //create possible difficulty add more of one difficulty to weight it towards that _PossibleDifficulty = [ "easy" //"easy" //"moderate" //"moderate" //"difficult" //"difficult" //"difficult" //"hardcore" ]; //choose difficulty and set value _difficulty = selectRandom _PossibleDifficulty; //SpaceGhost start _weaponCountSG = round (random 4); if (_weaponCountSG == 0) then {_weaponCountSG = 1}; _weaponsSG = ["srifle_DMR_01_F","srifle_EBR_F","srifle_DMR_07_blk_F","srifle_DMR_07_hex_F","srifle_DMR_07_ghex_F","Exile_Weapon_DMR","Exile_Weapon_SVD","Exile_Weapon_SVDCamo","Exile_Weapon_CZ550"]; _spawnWeaponsSG = []; _spawnMagSG = []; _spawnListSG = []; //SpaceGhost end switch (_difficulty) do { case "easy": { _AICount = (4 + (round (random 4))); //SpaceGhost Start for [{_sgW = 1}, {_sgW <= _weaponCountSG}, {_sgW = _sgW + 1}] do { _selectedWeaponSG = selectRandom _weaponsSG; _spawnWeaponsSG = _spawnWeaponsSG + _selectedWeaponSG; _magCountSG = round (random 3); if (_magCountSG == 0) then {_magCountSG = 1}; { _selectedMagSG = getArray (configFile >> "CfgWeapons" >> _selectedWeaponSG >> "magazines"); for "_sgM" from 1 to _magCountSG do { spawnMagSG = _spawnMagSG + _selectedMagSG; }; }forEach _spawnWeaponsSG; /*for [{_sgM = 1}, {_sgM <= _magCountSG}, {_sgM = _sgM + 1}] do { private _selectedMagSG = getArray (configFile >> "CfgWeapons" >> _selectedWeaponSG >> "magazines"); _spawnMagSG = _spawnMagSG + _selectedMagSG; };*/ }; _spawnListSG = _spawnWeaponsSG + _spawnMagSG; //SpaceGhost End _crate_weapons = (4 + (round (random 2))); _crate_weapon_list = ["srifle_DMR_01_F","srifle_EBR_F","srifle_DMR_07_blk_F","srifle_DMR_07_hex_F","srifle_DMR_07_ghex_F","Exile_Weapon_DMR","Exile_Weapon_SVD","Exile_Weapon_SVDCamo","Exile_Weapon_CZ550"]; _crate_items = (8 + (round (random 3))); _crate_item_list = ["10Rnd_762x54_Mag","20Rnd_762x51_Mag","20Rnd_650x39_Cased_Mag_F","Exile_Magazine_10Rnd_762x54","Exile_Magazine_5Rnd_22LR","Exile_Magazine_20Rnd_762x51_DMR","Exile_Magazine_20Rnd_762x51_DMR_Yellow","Exile_Magazine_20Rnd_762x51_DMR_Red","Exile_Magazine_20Rnd_762x51_DMR_Green","Exile_Magazine_20Rnd_762x51_DMR_White"]; _crate_backpacks = (1 + (round (random 1))); }; //COMMENTED THIS FOR TESTING PROPOSES /*case "moderate": { _AICount = (6 + (round (random 4))); _msgStart = ['#FFFF00',"Snipers have set up a moderate training camp, go steal their rifles"]; _crate_weapons = (6 + (round (random 2))); _crate_weapon_list = ["srifle_DMR_01_F","srifle_EBR_F","srifle_DMR_07_blk_F","srifle_DMR_07_hex_F","srifle_DMR_07_ghex_F","Exile_Weapon_DMR","Exile_Weapon_SVD","Exile_Weapon_SVDCamo","Exile_Weapon_CZ550"]; _crate_items = (10 + (round (random 3))); _crate_item_list = ["10Rnd_762x54_Mag","20Rnd_762x51_Mag","20Rnd_650x39_Cased_Mag_F","Exile_Magazine_10Rnd_762x54","Exile_Magazine_5Rnd_22LR","Exile_Magazine_20Rnd_762x51_DMR","Exile_Magazine_20Rnd_762x51_DMR_Yellow","Exile_Magazine_20Rnd_762x51_DMR_Red","Exile_Magazine_20Rnd_762x51_DMR_Green","Exile_Magazine_20Rnd_762x51_DMR_White"]; _crate_backpacks = (2 + (round (random 1))); }; case "difficult": { _AICount = (8 + (round (random 4))); _msgStart = ['#FFFF00',"Snipers have set up a difficult training camp, go steal their rifles"]; _crate_weapons = (9 + (round (random 2))); _crate_weapon_list = ["srifle_DMR_01_F","srifle_EBR_F","srifle_DMR_07_blk_F","srifle_DMR_07_hex_F","srifle_DMR_07_ghex_F","Exile_Weapon_DMR","Exile_Weapon_SVD","Exile_Weapon_SVDCamo","Exile_Weapon_CZ550"]; _crate_items = (14 + (round (random 3))); _crate_item_list = ["10Rnd_762x54_Mag","20Rnd_762x51_Mag","20Rnd_650x39_Cased_Mag_F","Exile_Magazine_10Rnd_762x54","Exile_Magazine_5Rnd_22LR","Exile_Magazine_20Rnd_762x51_DMR","Exile_Magazine_20Rnd_762x51_DMR_Yellow","Exile_Magazine_20Rnd_762x51_DMR_Red","Exile_Magazine_20Rnd_762x51_DMR_Green","Exile_Magazine_20Rnd_762x51_DMR_White"]; _crate_backpacks = (3 + (round (random 1))); }; //case "hardcore": default { _AICount = (8 + (round (random 8))); _msgStart = ['#FFFF00',"Snipers have set up an advanced training camp, go steal their rifles"]; _crate_weapons = (14 + (round (random 2))); _crate_weapon_list = ["srifle_DMR_01_F","srifle_EBR_F","srifle_DMR_07_blk_F","srifle_DMR_07_hex_F","srifle_DMR_07_ghex_F","Exile_Weapon_DMR","Exile_Weapon_SVD","Exile_Weapon_SVDCamo","Exile_Weapon_CZ550"]; _crate_items = (17 + (round (random 3))); _crate_item_list = ["10Rnd_762x54_Mag","20Rnd_762x51_Mag","20Rnd_650x39_Cased_Mag_F","Exile_Magazine_10Rnd_762x54","Exile_Magazine_5Rnd_22LR","Exile_Magazine_20Rnd_762x51_DMR","Exile_Magazine_20Rnd_762x51_DMR_Yellow","Exile_Magazine_20Rnd_762x51_DMR_Red","Exile_Magazine_20Rnd_762x51_DMR_Green","Exile_Magazine_20Rnd_762x51_DMR_White"]; _crate_backpacks = (4 + (round (random 1))); };*/ }; //_msgStart = ['#FFFF00',format["Snipers have set up a %1 training camp, go steal their rifles",_difficulty]]; _msgStart = ['#FFFF00',"Snipers have set up a training camp, go steal their rifles"]; // Hardcore needs different settings for AI and message and vehicle spawning if (_difficulty isEqualTo "hardcore") then { _pinCode = (1000 +(round (random 8999))); _vehicle = ["Exile_Car_Van_Guerilla01",[(_pos select 0) +17.2, (_pos select 1) -0],_pinCode] call DMS_fnc_SpawnPersistentVehicle; _msgWIN = ['#0080ff',format ["Convicts have killed the snipers and stolen their rifles,the truck code is %1...",_pinCode]]; _group = [ [[(_pos select 0)+3,(_pos select 1)-3,0],[(_pos select 0)+(10+(random 20)),(_pos select 1)+(10+(random 20)),0]], // Position AI in tent + 2nd squad _AICount, // Number of AI _difficulty, // "random","hardcore","difficult","moderate", or "easy" "sniper", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher] _side // "bandit","hero", etc. ] call DMS_fnc_SpawnAIGroup_MultiPos; } else { _vehicle = ["Exile_Car_Van_Guerilla01",[(_pos select 0) +17.2, (_pos select 1) -0,0],[], 0, "CAN_COLLIDE"] call DMS_fnc_SpawnNonPersistentVehicle; _msgWIN = ['#0080ff',"Convicts have killed the snipers and stolen their rifles"]; _group = [ [(_pos select 0)+3,(_pos select 1)-3,0], // Position AI in tent _AICount, // Number of AI _difficulty, // "random","hardcore","difficult","moderate", or "easy" "sniper", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher] _side // "bandit","hero", etc. ] call DMS_fnc_SpawnAIGroup; }; // add vehicle patrol and randomise a little - same for all levels (as it uses variable) _veh = [ [ [(_pos select 0) -(75-(random 25)),(_pos select 1) +(75+(random 25)),0] ], _group, "assault", _difficulty, _side ] call DMS_fnc_SpawnAIVehicle; // add static guns - same for all levels _staticGuns = [ [ // make statically positioned relative to centre point and randomise a little [(_pos select 0) -(5-(random 1)),(_pos select 1)+(5-(random 1)),0], [(_pos select 0) +(5-(random 1)),(_pos select 1)-(5-(random 1)),0] ], _group, "assault", "static", "bandit" ] call DMS_fnc_SpawnAIStaticMG; // Create Buildings - use seperate file as found in the mercbase mission - same for all levels _baseObjs = [ "nedsnipercamp_objects", _pos ] call DMS_fnc_ImportFromM3E; // Create Crate type - same for all levels _crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate; // setup crate iteself with items - same for all levels _crate_loot_values1 = [ _spawnListSG, // Weapons SpaceGhost [], // Items + selection list _crate_backpacks // Backpacks ]; // Define mission-spawned AI Units _missionAIUnits = [ _group // We only spawned the single group for this mission ]; // Define mission-spawned objects and loot values _missionObjs = [ _staticGuns+_baseObjs+[_veh], // armed AI vehicle, base objects, and static guns [_vehicle], //this is prize vehicle [[_crate1,_crate_loot_values1]] //this is prize crate ]; //not start message here as they are defined in random choice to make the intro message different for each // Define Mission Win message - defined in choices // Define Mission Lose message - same for all levels _msgLOSE = ['#FF0000',"The Snipers have packed up and left, no rifles for you!"]; // Define mission name (for map marker and logging) - same for all levels _missionName = "Sniper Camp"; // Create Markers - same for all levels _markers = [ _pos, _missionName, _difficulty ] call DMS_fnc_CreateMarker; // Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly) _time = diag_tickTime; // Parse and add mission info to missions monitor _added = [ _pos, [ [ "kill", _group ], [ "playerNear", [_pos,DMS_playerNearRadius] ] ], [ _time, (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0)) ], _missionAIUnits, _missionObjs, [_missionName,_msgWIN,_msgLOSE], _markers, _side, _difficulty, [] ] call DMS_fnc_AddMissionToMonitor; // Check to see if it was added correctly, otherwise delete the stuff if !(_added) exitWith { diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName]; // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly) _cleanup = []; { _cleanup pushBack _x; } forEach _missionAIUnits; _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1)); { _cleanup pushBack (_x select 0); } foreach (_missionObjs select 2); _cleanup call DMS_fnc_CleanUp; // Delete the markers directly {deleteMarker _x;} forEach _markers; // Reset the mission count DMS_MissionCount = DMS_MissionCount - 1; }; // Notify players [_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus; if (DMS_DEBUG) then { (format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog; }; In case you want to compare to the original, Here it is: /* Sniper Camp Mission with new difficulty selection system Hardcore has persistent vehicle based on work by Defent and eraser1 easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk */ private ["_num", "_side", "_pos", "_OK", "_difficulty", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty"]; // For logging purposes _num = DMS_MissionCount; // Set mission side (only "bandit" is supported for now) _side = "bandit"; // This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos. // It also allows anybody to modify the default calling parameters easily. if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then { _this = [ [10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists], [ [] ], _this ]; }; // Check calling parameters for manually defined mission position. // You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass] _OK = (_this call DMS_fnc_MissionParams) params [ ["_pos",[],[[]],[3],[],[],[]], ["_extraParams",[]] ]; if !(_OK) exitWith { diag_log format ["DMS ERROR :: Called MISSION nedsnipercamp_mission.sqf with invalid parameters: %1",_this]; }; //create possible difficulty add more of one difficulty to weight it towards that _PossibleDifficulty = [ "easy", "easy", "moderate", "moderate", "difficult", "difficult", "difficult", "hardcore" ]; //choose difficulty and set value _difficulty = selectRandom _PossibleDifficulty; switch (_difficulty) do { case "easy": { _AICount = (4 + (round (random 4))); _crate_weapons = (4 + (round (random 2))); _crate_weapon_list = ["srifle_DMR_01_F","srifle_EBR_F","srifle_DMR_07_blk_F","srifle_DMR_07_hex_F","srifle_DMR_07_ghex_F","Exile_Weapon_DMR","Exile_Weapon_SVD","Exile_Weapon_SVDCamo","Exile_Weapon_CZ550"]; _crate_items = (8 + (round (random 3))); _crate_item_list = ["10Rnd_762x54_Mag","20Rnd_762x51_Mag","20Rnd_650x39_Cased_Mag_F","Exile_Magazine_10Rnd_762x54","Exile_Magazine_5Rnd_22LR","Exile_Magazine_20Rnd_762x51_DMR","Exile_Magazine_20Rnd_762x51_DMR_Yellow","Exile_Magazine_20Rnd_762x51_DMR_Red","Exile_Magazine_20Rnd_762x51_DMR_Green","Exile_Magazine_20Rnd_762x51_DMR_White"]; _crate_backpacks = (1 + (round (random 1))); }; case "moderate": { _AICount = (6 + (round (random 4))); _msgStart = ['#FFFF00',"Snipers have set up a moderate training camp, go steal their rifles"]; _crate_weapons = (6 + (round (random 2))); _crate_weapon_list = ["srifle_DMR_01_F","srifle_EBR_F","srifle_DMR_07_blk_F","srifle_DMR_07_hex_F","srifle_DMR_07_ghex_F","Exile_Weapon_DMR","Exile_Weapon_SVD","Exile_Weapon_SVDCamo","Exile_Weapon_CZ550"]; _crate_items = (10 + (round (random 3))); _crate_item_list = ["10Rnd_762x54_Mag","20Rnd_762x51_Mag","20Rnd_650x39_Cased_Mag_F","Exile_Magazine_10Rnd_762x54","Exile_Magazine_5Rnd_22LR","Exile_Magazine_20Rnd_762x51_DMR","Exile_Magazine_20Rnd_762x51_DMR_Yellow","Exile_Magazine_20Rnd_762x51_DMR_Red","Exile_Magazine_20Rnd_762x51_DMR_Green","Exile_Magazine_20Rnd_762x51_DMR_White"]; _crate_backpacks = (2 + (round (random 1))); }; case "difficult": { _AICount = (8 + (round (random 4))); _msgStart = ['#FFFF00',"Snipers have set up a difficult training camp, go steal their rifles"]; _crate_weapons = (9 + (round (random 2))); _crate_weapon_list = ["srifle_DMR_01_F","srifle_EBR_F","srifle_DMR_07_blk_F","srifle_DMR_07_hex_F","srifle_DMR_07_ghex_F","Exile_Weapon_DMR","Exile_Weapon_SVD","Exile_Weapon_SVDCamo","Exile_Weapon_CZ550"]; _crate_items = (14 + (round (random 3))); _crate_item_list = ["10Rnd_762x54_Mag","20Rnd_762x51_Mag","20Rnd_650x39_Cased_Mag_F","Exile_Magazine_10Rnd_762x54","Exile_Magazine_5Rnd_22LR","Exile_Magazine_20Rnd_762x51_DMR","Exile_Magazine_20Rnd_762x51_DMR_Yellow","Exile_Magazine_20Rnd_762x51_DMR_Red","Exile_Magazine_20Rnd_762x51_DMR_Green","Exile_Magazine_20Rnd_762x51_DMR_White"]; _crate_backpacks = (3 + (round (random 1))); }; //case "hardcore": default { _AICount = (8 + (round (random 8))); _msgStart = ['#FFFF00',"Snipers have set up an advanced training camp, go steal their rifles"]; _crate_weapons = (14 + (round (random 2))); _crate_weapon_list = ["srifle_DMR_01_F","srifle_EBR_F","srifle_DMR_07_blk_F","srifle_DMR_07_hex_F","srifle_DMR_07_ghex_F","Exile_Weapon_DMR","Exile_Weapon_SVD","Exile_Weapon_SVDCamo","Exile_Weapon_CZ550"]; _crate_items = (17 + (round (random 3))); _crate_item_list = ["10Rnd_762x54_Mag","20Rnd_762x51_Mag","20Rnd_650x39_Cased_Mag_F","Exile_Magazine_10Rnd_762x54","Exile_Magazine_5Rnd_22LR","Exile_Magazine_20Rnd_762x51_DMR","Exile_Magazine_20Rnd_762x51_DMR_Yellow","Exile_Magazine_20Rnd_762x51_DMR_Red","Exile_Magazine_20Rnd_762x51_DMR_Green","Exile_Magazine_20Rnd_762x51_DMR_White"]; _crate_backpacks = (4 + (round (random 1))); }; }; //_msgStart = ['#FFFF00',format["Snipers have set up a %1 training camp, go steal their rifles",_difficulty]]; _msgStart = ['#FFFF00',"Snipers have set up a training camp, go steal their rifles"]; // Hardcore needs different settings for AI and message and vehicle spawning if (_difficulty isEqualTo "hardcore") then { _pinCode = (1000 +(round (random 8999))); _vehicle = ["Exile_Car_Van_Guerilla01",[(_pos select 0) +17.2, (_pos select 1) -0],_pinCode] call DMS_fnc_SpawnPersistentVehicle; _msgWIN = ['#0080ff',format ["Convicts have killed the snipers and stolen their rifles,the truck code is %1...",_pinCode]]; _group = [ [[(_pos select 0)+3,(_pos select 1)-3,0],[(_pos select 0)+(10+(random 20)),(_pos select 1)+(10+(random 20)),0]], // Position AI in tent + 2nd squad _AICount, // Number of AI _difficulty, // "random","hardcore","difficult","moderate", or "easy" "sniper", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher] _side // "bandit","hero", etc. ] call DMS_fnc_SpawnAIGroup_MultiPos; } else { _vehicle = ["Exile_Car_Van_Guerilla01",[(_pos select 0) +17.2, (_pos select 1) -0,0],[], 0, "CAN_COLLIDE"] call DMS_fnc_SpawnNonPersistentVehicle; _msgWIN = ['#0080ff',"Convicts have killed the snipers and stolen their rifles"]; _group = [ [(_pos select 0)+3,(_pos select 1)-3,0], // Position AI in tent _AICount, // Number of AI _difficulty, // "random","hardcore","difficult","moderate", or "easy" "sniper", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher] _side // "bandit","hero", etc. ] call DMS_fnc_SpawnAIGroup; }; // add vehicle patrol and randomise a little - same for all levels (as it uses variable) _veh = [ [ [(_pos select 0) -(75-(random 25)),(_pos select 1) +(75+(random 25)),0] ], _group, "assault", _difficulty, _side ] call DMS_fnc_SpawnAIVehicle; // add static guns - same for all levels _staticGuns = [ [ // make statically positioned relative to centre point and randomise a little [(_pos select 0) -(5-(random 1)),(_pos select 1)+(5-(random 1)),0], [(_pos select 0) +(5-(random 1)),(_pos select 1)-(5-(random 1)),0] ], _group, "assault", "static", "bandit" ] call DMS_fnc_SpawnAIStaticMG; // Create Buildings - use seperate file as found in the mercbase mission - same for all levels _baseObjs = [ "nedsnipercamp_objects", _pos ] call DMS_fnc_ImportFromM3E; // Create Crate type - same for all levels _crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate; // setup crate iteself with items - same for all levels _crate_loot_values1 = [ [_crate_weapons,_crate_weapon_list], // Weapons [_crate_items,_crate_item_list], // Items + selection list _crate_backpacks // Backpacks ]; // Define mission-spawned AI Units _missionAIUnits = [ _group // We only spawned the single group for this mission ]; // Define mission-spawned objects and loot values _missionObjs = [ _staticGuns+_baseObjs+[_veh], // armed AI vehicle, base objects, and static guns [_vehicle], //this is prize vehicle [[_crate1,_crate_loot_values1]] //this is prize crate ]; //not start message here as they are defined in random choice to make the intro message different for each // Define Mission Win message - defined in choices // Define Mission Lose message - same for all levels _msgLOSE = ['#FF0000',"The Snipers have packed up and left, no rifles for you!"]; // Define mission name (for map marker and logging) - same for all levels _missionName = "Sniper Camp"; // Create Markers - same for all levels _markers = [ _pos, _missionName, _difficulty ] call DMS_fnc_CreateMarker; // Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly) _time = diag_tickTime; // Parse and add mission info to missions monitor _added = [ _pos, [ [ "kill", _group ], [ "playerNear", [_pos,DMS_playerNearRadius] ] ], [ _time, (DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0)) ], _missionAIUnits, _missionObjs, [_missionName,_msgWIN,_msgLOSE], _markers, _side, _difficulty, [] ] call DMS_fnc_AddMissionToMonitor; // Check to see if it was added correctly, otherwise delete the stuff if !(_added) exitWith { diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName]; // Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly) _cleanup = []; { _cleanup pushBack _x; } forEach _missionAIUnits; _cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1)); { _cleanup pushBack (_x select 0); } foreach (_missionObjs select 2); _cleanup call DMS_fnc_CleanUp; // Delete the markers directly {deleteMarker _x;} forEach _markers; // Reset the mission count DMS_MissionCount = DMS_MissionCount - 1; }; // Notify players [_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus; if (DMS_DEBUG) then { (format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog; }; (I dont think that i need to do this, but just to be clear, This code is not mine, its a nedsnipercamp_mission for DMS. Im just modding it. Thanks to the original creators.) So can anyone find what i did wrong? Is it really a syntax error? Can someone help me? BTW, if someone can help me to know how can i insert this functions of code in server side to prevent from people just downloading the mission and using it pretending they made it. it would be great. thank you for the attention =D
  7. Hello! I am trying to set the mission difficulty for a singleplayer scenario, I've seen how people do it for dedicated servers but it doesn't seem to work for a singleplayer scenario. The parameters I am trying to change are the HUD elements and reduced player damage. The showHUD command does not encompass all of the desired settings, I tried :( Any help would be much appreciated, thank you!
  8. Long time reader of forums first time poster. This has been driving me up a wall for a while, I'm trying to figure out how to use "addMissionEventHandler ["eachFrame", {" properly when scripting for multiplayer missions. As it stands right now I'm using the following bit of code to make an empty prop object (big1) move smoothly through the air during the outro to the mission. addMissionEventHandler ["eachFrame", { big1 setVelocityTransformation [getPosASLVisual big1, getPosASLVisual big1 vectorAdd [0,10,0],[0,10,0],[0,10,0],vectorDirVisual big1, vectorDirVisual big1, vectorUpVisual big1, vectorUpVisual big1, 0.1]}]; Its works great in single player, and in multiplayer the host sees the object moving during cut-scene, but client players just see a stationary object. The code is executed in outro.sqf which is executed when the final task trigger is activated. I've tried using "if (hasInterface) then {..." in attempt to get it to run client-side, but that doesn't seem to be the answer. How can I get all clients to see this? Or, If I'm barking up the wrong tree and there's a better way of doing this any help or hints would be greatly appreciated.
  9. For a MP server I'm trying to setup an area trigger where if entered by a vehicle, the trigger will empty the fuel tank. Now I know an easy way to do this is to name the vehicles and then add in to the trigger" vehiclename setfuel 0;" etc but I was wondering if there was an alternative way to remove fuel without having to name all the vehicles on the server? I've been trying various iterations of 'setfuel' like so, but none of them seem to work or do what I want. [_vehicle] remoteexec [setfuel 0, _vehicle]; If anyone can point me in the correct direction, that would be marvellous, thanks!
  10. Hello everyone, i hope you can help me with my problem...... i try to rotate my Objects from a simple Script that when ever i press a button it rotate a little bit but if i just letting stay it without pressing anything the Object move back at it Start Position..... my Script when i roatiting it is in my keyhandler the folowing : case 18: { _Dir = getDir MoveObj ; _NewDir = _Dir + 0.3; MoveObj setDir _NewDir; };
  11. Hey guys, what is the most efficient way to load your custom scripts during initialization? So far I've just been using [] execVm over and over and I can't help but feel there is a better way. Any better ways to list your scripts say as an "include" like in c++? I'm coming from a software developers point of view so throw what you got at me.
  12. Hello! I am trying to loop some commands within an .SQF that includes IF ELSE statements. I need the script to loop while a certain variable is true so that the mission may later set the variable to false, disabling the script. Here is my current script: tester.sqf ____________________________________________________ _xxx3 = true; While {_xxx3 == true} do { sleep 1; if (istouchingground player) then { hint "You are on ground"; } else { hint "Game Detected you are in water, will reset position in 3 seconds"; sleep 3; if (istouchingground player) then { hint "Not in water anymore"; } else { player setpos [0,0,0]; hint "Position reset";};}; ______________________________________________________ After the player has been detected in the water (or not touching ground) I have the script run another check 3 seconds afterwards to ensure that the player is actually in water and not glitching out in air for a few seconds, as is common in Arma, so that is why I have included another IF-ELSE statement below. The "sleep 1" I included in the beginning is to help minimize the impact on performance, so that the script only runs every second instead of every frame. Running execvm "tester.sqf"; gives no error messages but the script does not run. I tried scouring the forums for a similar situation and somehow I haven't found anything. If anyone can help me out I would be very grateful, I've been stumped on this for a few days now. Thank you!!
  13. I am new to mission creation and a scripting approach and my progress at learning has been good but looking to streamline what I am sure is a sub optimal process for loading new scripts and then testing those on live server. I am working on an A3Wastelands mission, now becoming increasingly customised it has grown from 6MB to sitting at about 10MB. I will explain my current workflow and welcome suggestions about changes to that to improve cycle time from new script developed to tested on server. Workflow Generate/modify new script - using Visual Studio Code - managing a local git repository to stage and commit all changes. I like the editor and combined with the git process is great to understand what you have changed, setting up for good rollback processes when it all goes skew. Some changes like syntax requires one set of brackets, edited in seconds. Clone from git folder on local computer to new local location, but without the git entries folder - they add to much to a folder size for next step. (5 seconds give or take) Generate local .pbo using .pbo manager to zip up the "gitless clone" copy of the mission. Compiling quick (10 seconds give or take) Using Filezilla connect to my.gameservers (that is the host provider I am using). Get new .pbo into correct mpmissions location on server, ensure configs line up and restart server. (with variable ADSL internet speed can be 1-5 minutes to upload). Restart server. (usually about 30-60 seconds to initialize server for login access from Arma launcher). Reconnect to server with local ARMA launcher and start game. (usually 2-5 minutes to upload new mission files, establish client session) Run server for period. Previous provider had a streaming log viewer functionality, new one doesnt, so using periodic log file (RPT) download, to then open log using GamutLogViewerProfessional. The line parsing, filtering in the log viewer is great, and fast, its just the continual download and lack of live streaming that has become annoying. Fast but repetitive. Most testing involves cycling sub missions quickly, fast timings for new missions spawning and quick expiry, god mode to poke the missions for responses required, and attempting to use diag_log to set log messages for error/logic/expected response flaws. (time consuming and rpt file entry problems currently) Based on responses observed in game or in logs, change code and return to step 1. Opportunities Things I know I dont know about, but had no luck finding answers yet - reference articles/sites would be fantastic. I think I might need to get RCON skills - but again a little unclear if that helps me more as an administrator vs a code tester. The admin stuff isnt a big deal at present. Live log streaming - seen evidence but dont have a solution in place for that at Gamerservers yet. .pbo generation - previous host had an inbuilt capability to compile the .pbo on the server reducing the upload traffic and time considerably, is the best way to look at installing a .pbo generator on the server myself for this? Is that a big deal to implement? git publish - seems more like publishing back to a public repository, wonder of i should be pushing to a local folder ie the one that wont have the .git folder, or could i git push to the server folder just the changes. No luck finding git answers to this myself yet. I do not use the debug console within the editor or the server when running - i think i am missing something about the debug console concept it appears lined up to force only very simple issues. Again lacking reference sources to learn more on that. For a complex mission with many scripts, are these something that can be tested in mission editor, or outside editor. I use editor for waypoints, additional buildings, manually generating mission routes that are then codified into sqfs., i dont test the sqfs in there yet, should I. Server memory consumption appears to be an issue as restart intervals increase. Previous server could run for 24 hours and stay under 2GB memory allocation, at 48 hours be under 150% and then by 72 hours crash due to over commit. Rather than double subscription settled for 24 hour restarts. New host does not have this easy monitoring indicator so i think i need an additional piece of software to monitor. suggestions? Anything else that I dont know, that I dont know about, sure there is heaps. Finally, anyone who has had the patience to get his far through this monologue, i appreciate your time so far. Even if you only have a suggestion for 1 item in workflow or a comment on an opportunity I welcome your input. I did 6 months of pascal, fortran, basic programming, but i refuse to say how long ago that was..... So suggest i write up a new C# routine, that feels well beyond where I am at now. Server management is new to me, but sort of getting the idea of the Arma approach to server side, client side management. Thanks
  14. Hello, We used a script to create fire on the map ,but it seems doesn't work anymore ... Somthing change recently ? Everything seems work fine except the visual of the fire ... Sorry for my bad english ... My script : /* feu.sqf Author: Joachim McK41n & Victor for www.prism.ovh and www.borderlife.eu Description: Init of the fire (position and particle) */ private ["_logicCenter","_densite","_size","_particulesize","_logicGroup","_myLogicObject","_position","_fumee","_smoke","_smoke1","_smoke2","_smoke3"]; FIRESYSTEM_status = 1; _position = [ [7248.221,7902.215], [7284.408,8002.937], [7328.91,7988.436], [7330.886,7870.988], [7220.022,7769.310], [7016.862,7665.172], [6973.227,7734.075], [7079.95,7494.45], [7047.032,7052.575], [7033.538,5877.813], [7088.565,5333.449], [6793.419,5509.893], [6268.532,5377.708], [7689.646,4463.886], [8453.264,3650.178], [7962.492,3677.762], [7603.085,3729.685], [7379.489,4132.045], [6763.38,3485.052], [6434.504,3653.694], [6515.486,3946.17], [5371.91,3309.547], [5577.742,3028.360], [6240.154,2519.370], [5507.475,3498.792], [5070.621,4040.475], [5073.118,4953.481], [4194.532,4011.217], [3733.564,4085.337], [3340.427,4630.272], [3484.509,5352.209], [2514.769,3891.06], [2622.133,4152.140], [2808.309,4609.104], [3228.675,6290.59], [2990.029,7042.942], [3193.270,7302.877], [3278.756,8575.616], [3325.257,8877.280], [5384.771,7843.193], [4752.810,8024.902], [5014.568,8969.789], [5111.227,9061.804], [4793.549,9169.119], [4434.848,9534.307], [4748.809,10326.111], [5386.066,10073.317], [5797.076,9771.063], [6262.168,9495.117], [6560.371,9522.497], [6712.688,9179.297], [7170.891,9768.592], [6945.721,8640.133], [6930.321,8154.135], [8023.768,7826.339], [7915.164,7460.462], [6707.968,7466.603], [6267.506,7301.861], [6299.848,4723.550], [8241.715,5395.611], [9876.938,4313.292], [9557.486,4050.109], [9606.530,3783.365], [9287.656,3612.633], [9457.21,3403.740], [9785.166,3722.892], [10740.619,4167.578], [11168.437,4142.943], [11533.472,4178.396], [7932.085,7477.508], [7313.628,7829.134], [7355.167,7882.431], [7259.667,7958.107], [7259.043,7968.471], [7313.542,8019.859], [7200.194,7928.984], [7217.958,7795.975], [7042.558,7696.161], [7075.163,8017.439], [7074.386,7137.277], [7128.321,6094.658], [7149.663,6037.67], [6349.478,5370.261], [7922.908,4036.301], [8215.435,3910.88], [8244.328,3504.572], [8120.783,3154.520], [8368.901,3119.829], [7655.749,3324.765], [5987.549,3440.058], [6204.109,2486.838], [6230.793,2870.822], [6831.929,2719.921], [4258.728,2467.598], [3669.155,3210.409], [4919.764,3914.835], [5527.845,5693.555], [5310.882,5529.224], [5743.388,5225.202], [1786.590,3461.261], [1084.361,666.59], [1394.610,1221.776], [2487.827,2222.515], [2468.267,5170.738], [3295.479,6368.682], [3080.467,6825.77], [4296.550,6817.070], [3571.882,8519.835], [3598.778,8630.583], [5538.113,11259.927], [5562.836,11134.115], [5458.769,11384.115], [5820.159,10540.255], [5893.200,10719.465], [6106.278,10860.886], [6090.351,10752.076], [6201.973,10693.936], [7071.652,12185.961], [7461.036,10714.266], [7095.191,10324.588], [7637.577,10688.432], [7699.432,10393.967], [6067.289,8641.198], [6020.251,8622.433], [6129.021,8523.253], [5896.355,8458.906], [5878.344,8733.198], [6050.003,8799.310], [6100.481,8953.772], [6079.811,8728.780], [7101.258,8968.055], [7113.98,8924.720], [7075.61,8907.017], [7361.047,8718.827] ] call BIS_fnc_selectRandom; _size = [5,10,30,40] call BIS_fnc_selectRandom; _particulesize = [3,5,10,15] call BIS_fnc_selectRandom; _densite = [10,20,30,50,40] call BIS_fnc_selectRandom; _logicCenter = createCenter sideLogic; _logicGroup = createGroup _logicCenter; _myLogicObject = _logicGroup createUnit ["ModuleEffectsFire_F", _position, [], 0, "NONE"]; _myLogicObject setVariable ["ColorRed",0.5,true]; _myLogicObject setVariable ["ColorGreen",0.5,true]; _myLogicObject setVariable ["ColorBlue",0.5,true]; _myLogicObject setVariable ["ParticleLifeTime",1,true]; _myLogicObject setVariable ["ParticleDensity",_densite,true]; _myLogicObject setVariable ["ParticleSize",_particulesize,true]; _myLogicObject setVariable ["ParticleSpeed",1,true]; _myLogicObject setVariable ["EffectSize",_size, true]; _myLogicObject setVariable ["ParticleOrientation",0,true]; _myLogicObject setVariable ["FireDamage",3,true]; _fumee = _logicGroup createUnit ["ModuleEffectsSmoke_F", getpos _mylogicObject, [], 0, "NONE"]; _fumee setVariable ["ParticleDensity",_densite,true]; _fumee setVariable ["ParticleSize",_particulesize,true]; _fumee setVariable ["EffectSize",_size, true]; _marker = createMarker ["feu", position player ]; "feu" setMarkerType "mil_objective"; "feu" setMarkerSize [1, 1]; "feu" setMarkerDir 0.93884; "feu" setMarkerText "Incendie"; "feu" setMarkerColor "ColorRed"; "feu" setMarkerPos getpos _mylogicObject; waitUntil {(getMarkerColor "feu") == "ColorOrange"}; _smoke = "SmokeShell" createVehicle getpos _mylogicobject; sleep 5; deleteVehicle _smoke; _smoke1 = "SmokeShell" createVehicle getpos _mylogicobject; sleep 40; _smoke2 = "SmokeShell" createVehicle getpos _mylogicobject; sleep 40; _smoke3 = "SmokeShell" createVehicle getpos _mylogicobject; sleep 10; {if (typeOf _x == "#particlesource") then {deleteVehicle _x}} forEach (_myLogicObject nearObjects 5); deleteVehicle _myLogicObject; "feu" setMarkerColor "ColorGreen"; sleep 120; FIRESYSTEM_status = 0; deletemarker "feu";
  15. Hi. Anyone know how to make these animated/clickable markers on the map..? Like in arma 2 warfare for example where you select respawn location. I don't know where to start with it Never dealt with it before
  16. I am trying to update a older aircraft and one problem I am having is the ejection system, it is not working - when I eject from the aircraft, the ejection seat appears but hovers above the aircraft and nothing else happens. I have tried adding in this; I am not sure how to get it properly working, any help would be appreciated.
  17. Voronoi diagram using Fortune's algorithm Here's a set of functions developed for my current project to generate Voronoi diagrams in SQF without the need for addons. What does it do? The code generates the edges of the Voronoi diagram from a given set of sites (positions). If you do not yet know what a Voronoi diagram is or what it's uses are check out https://en.wikipedia.org/wiki/Voronoi_diagram. Example: Using the Altis towns as sites How do I use it? Installation: Download the example mission to get the code. Copy the voronoi folder to your mission. In your missions CfgFunctions class include "voronoi\cfgfunctions.ext" like so: class CfgFunctions { #include "voronoi\cfgfunctions.ext" }; Execution: The only included function you will need to call is VOR_fnc_getEdges: private _edges = [_sites, _width, _height] call VOR_fnc_getEdges; VOR_fnc_getEdges takes an array of sites (position2Ds), and width and height in meters for the area to scan. All sites must be inside the rectangle [0,0] and [width, height]. The function returns an array of edges that constitute the Voronoi diagram. Each edge is an array composed of: [ EDGE_START, - Start position EDGE_END, - End position EDGE_LEFT, - Site on the left EDGE_RIGHT, - Site on the right EDGE_NEIGHBOUR, - Internal usage EDGE_LINE_F, - f in the function for the edge's line: y = fx + g EDGE_LINE_G, - g in the function for the edge's line: y = fx + g EDGE_DIRECTION - 2-dimensional direction vector of the ray going from start to end, not normalized. ] Where do I get it? Link (voronoi_example.Altis.zip) Examples Known issues In some cases some edges may not find an intersection and only intersect with the bounding box. I haven't managed to isolate the issue yet but it seems to be a precision error in the intersection check. Suggestions are welcome. It's slow. For 50 sites a call in-mission takes about ~0.5 seconds which is very slow compared to good c++ code. Not entirely sure yet if it's because of my implementation or just SQF having a hard time with the complexity. In my in-mission testing 50 sites took about 0.5 seconds in an unscheduled environment and in scheduled took 1-2.5 seconds. During mission init the code is significantly faster, clocking in 150 sites in about 0.5 seconds. I can put this down partly to the way I handle data but not sure how much quicker I could make it. If anyone has the energy to dissect the code I'd love hear your input. Feedback Constructive feedback is always welcome. I've probably missed cases where the code will break. If you're reporting a bug please if possible also submit the following: The complete set of sites passed. Height and width passed.
  18. G'day guys, There has been a lot of new threads by newcomers that ask the same/similar questions, found in many other threads. If you are new to ArmA or want to get into scripting, welcome to the forums! :) As you know, there is a search box at the top of the page, it can be used to search throughout every thread what you are after. Bear in mind that it may sometimes not provide you with the proper answer. This, however, doesn't mean that another thread should be opened. In fact, there is a huge library of scripts you probably never heard of. Check it out, there is an abundant of examples provided in each script command: https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3 It is constantly being updated with new facts, info and scripts by many of our users such as KK. (Killzone Kid) Lastly, here are some basic info and tips on scripting. To create your own scripts, navigate to "My Documents\Arma 3\missions\your_saved_mission". Then, create a text document and rename the extension ".txt" to ".sqf". Once done, open it with Notepad or Notepad++. To run your script in the game, navigate to your mission folder and create a "init.sqf". Open it and put this in: [] execVM "myscript.sqf"; If you want to get a specific unit to do some action (e.g. setDamage or setFuel), give your unit a name but without spaces. Then in a trigger, put this in: myguy setDamage 1; The symbol ";" used after each command, is to separate the command from another. (Think of it as a period symbol)Also, if you are thinking that Steam Workshop is the only place for mods, addons, scripts, etc. Armaholic is the official site for releasing such. You can find it here, they also have a FAQ as well: http://www.armaholic.com If you want to convert a string to code, you can use call compile STRING. This is very handy (and sometimes a smart trick) when passing code around such as lbData. ;) This wraps up the introduction for those new to scripting. If you have any questions, concerns or ideas that may improve this thread, feel free to post here. ^_^ Happy Scripting, ;) Rawner135 ArmA 3 Tutorial Links: Arma 3 Scripting Tutorial For Noobs - forums.bistudio.com [Tutorial] Server Side Scripting - forums.bistudio.com Camera Scripting - www.armaholic.com KK's blog - ArmA Scripting Videos: Modding Tutorials by GameDev Byrne: https://www.youtube.com/playlist?list=PLqRU_EL4pwOHOJ6L2P5XlpfmNoWqulZqf Other Tutorial Links: http://www.kylania.com/ex/ Conversation System Mission Editor ArmA 2 Mission Editor Triggers OFPEC ArmA 2 Scripting Commands ArmA2 COMREF Forums Post - Classnames ArmA2 Library ArmAholic ArmA2 Moves ArmA2 Modules Description.ext Scripting Topics (Check All Links) Startup Parameters Crash Files Tasks ARMA 2 Functions PostProcess Effects
  19. Hello Community, As the title suggested my question is pretty short. Can you publish a custom made campaign (with chapters and stuff) on the Steam workshop? If that's possible I would be really glad to know how to do that. Thx!
  20. So I'm not sure if this has been asked or what but from searching i haven't found it yet. So here is my question is it possible to add the animation/movement controls of a infantry and apply it to a vehicle like for instance; infantry gets into vehicle and said vehicle is basically a super sized infantry. The reason i ask is because i would like to add mechs/mech-type vehicles and i under stand the basics of coding from some other projects i have worked on for fun. I just kinda wonder/hoping that you would be able to apply the Infantry game controller to a vehicle profile so that it can have Armor/components that can be destroyed and repaired.
  21. Hello guys! I have a mission, the author made a few cities to be captured. I want to add more cities to play longer. Here's an author's code for the cities: class Params { class FrontLine { title = "START"; texts[] = {"Sofia", "Delfinaki", "Ioaninna", "Paros"}; values[] = {3389, 5316, 5871, 9680}; default = 3389; }; }; And now i wonder - where did he get those id's? How can i find such ID for a city?
  22. I've been stuck with a mission I can't finish without your guys help. I know some basic scripting but I don't want to spend days overcomplicating something if there is an easier solution. So here is the simple explanation of a script I'm going for: Let's say there are 10 blocks. Each are called block_1, block_2, etc. Now, after every 60 seconds the script will randomly select one (1) of the blocks and delete it. Then, this script will repeat after another 60 seconds by identifying the remaining nine (9) blocks and then selecting from one of those to delete. This process will continue until only 1 block remains. There is no probability needed, it just needs to remove one block repeatedly in the given time inputted until only one remains. I did find this script posted by Dreadedentity in my searches, but it's based on a probability of each object all at once. Then even if I add a loop to that script there are times where no objects are deleted. Any help would be appreciated. Thanks!
  23. Hey Guys! I'm creating a mission and I want a task to be SUCCEEDED when a pop up target is shot. I've tried many things like trying to get the task to be succeeded when a gun is fired or when the target does down or comes up. Nothing has worked. I would appreciate any help! Thanks!
  24. Hey guys, the title pretty much says it all. I have a pretty heavy amount on mission making under my belt and this is a question I have wondered for quite some time. On many of my missions I have a "recruiter" NPC that has addaction commands to recruit a variety of friendly infantry units to join the player squad. I'd love to have a way to set a "cost" for this function based on the players score (say 10 kills to recruit an AI squadmate). I am aware of the "Set Cost" module for zeus but I dont think that can be used in this way. I know that such things are possible with heavy scripting (thinking about the DUWS mods) , wondering if anyone has any semi straightforward solutions to this...
  25. Hi there people, Is there a way to make a static artillery emplacement such as a mortar have an infinite range across an entire map via a script? I don't like using the virtual combat support modules as I like to hear/see the artillery being fired from a base camp far from the front lines. I've used the ALiVE mod and MCC forward observer artillery interface before however these both still require the artillery gun to be in range. I don't want to have to move Artillery vehicles across the map to get within range ya see. Thanks in advance, - Jack
├Ś