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 268 results

  1. 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
  2. Has anyone figured out how to execute the keyframe animation via script? the only thing I can find on keyframe animation is the page explaining the modules.
  3. MGI ADVANCED MODULES Hi all, Here is an addon for mission makers. If you need to easily spawn some factions, some civilian life or just add randomized weapons loot in houses... If you want an advanced AI heal & revive, for SP or MP mission, able to heal players or bros.. If you want a transport support on any vehicle... A vehicle respawn system with crew, waypoints, loadouts, addActions, arsenal.... Friendly kill sanction... AI cannons able to fire HE shells on infantry... Some generators able to switch on/off a district... or adapt silencers to combat behavior... or perhaps a simple tool for reading all map object classes/display names/p3d model names... Other tools like tire puncture on barbed wires? ... And of course, MP compatible, favorite mods compatible... Here you are. https://steamcommunity.com/sharedfiles/filedetails/?id=1682280809 Adapt silencers to stealth/combat situation No video SP/MP compatible - all mods Advanced locations See video SP/MP compatible - all mods Advanced transport See video SP/MP compatible - all mods AI can respawn No video SP/MP compatible - all mods Civilian life See video SP/MP compatible - some known mods Drop vehicle instead of crate See video SP/MP compatible - all mods Enhanced Turrets No video SP/MP compatible - all mods (so far. feedback welcome) Flip overturned vehicle No video SP/MP compatible _ all mods HALO jump No video SP/MP compatible - all mods Heal & revive see video SP/MP compatible - check for mods... Modded units are not a problem. But some mods like ACE have their own scripts and could be incompatible. Furthermore, I scripted for some conditions about the presence of FirstAidKit and MediKit. This module is complex enough. I didn't grab into mods for exotic classes of items (and I will not). Of course, you can choose to skip these conditions. Kill punishment See video SP/MP compatible -all mods Loot weapons & items in houses See video SP/MP compatible - some mods (CUP UNSUNG IFA3 RHS R3F) Marker to Task See video SP/MP compatible - all mods Respawn vehicles No video (see an old one about script to have an idea) SP/MP compatible - all mods SP simple respawn No video Single Player only Switch ambient lights See video SP/MP compatible - all mods so far... Tire puncture No video SP/MP compatible - some mods Touch of class! See video SP/MP compatible - all mods Wear what you want No video SP / MP compatible - all mods (not all. Some weird mods don't have true uniforms but some skinned units... Nothing to do with that) Have fun! Pierre MGI
  4. Alright, so currently I am developing an OPTRE Spec Ops mission, where a group of ODST soldiers start in a Pelican dropship headed towards its insertion point. I want to begin the mission with a red light within the interior of the Pelican, which I have managed to do successfully. But, I want that light to switch to green whenever the dropship is over the insertion point activated by a trigger that I have designated as (A1). It seems that the code I implement within the initialization fields of the dropship works, but only for a split second as the red light flickers, but does not change to green. Any help is greatly appreciated! This is the code that I have tried to implement: if( triggerActivated A1) then { //The following code will set the interior color to Green. light2 = "#lightpoint" createVehicleLocal [0,0,0]; light2 setLightBrightness .125; light2 setLightAmbient [1,0.2,0.2]; light2 setLightColor [0,0,255]; light2 lightAttachObject [this,[0,-2.5,-0.8]]; }; if ( !triggerActivated A1) then { //The following code will set the interior to Red. light1 = "#lightpoint" createVehicleLocal [0,0,0]; light1 setLightBrightness .125; light1 setLightAmbient [1,0.2,0.2]; light1 setLightColor [255,0,0]; light1 lightAttachObject [this,[0,-2.5,-0.8]]; pelican1 say3D ["music1", 10, 1]; };
  5. Original post: "Is there any way to make backpacks accessable only when they are on ground or by other players using 'Open Backpack' action? The goal is to make player drop the backpack to get access in its inventory and so make them more realistic." UPDATE 15th Sept. -18: An addon version made! Script provided by @pierremgi PBO provided by @HazJ Download: https://hazjohnson.com/ArmA/@realisticBackpacks.zip Addon is now signed with key and bikey.
  6. Hi, I am currently trying to find a way to check if local player is function caller in sqf file. I have civilian with addAction, which calls this script: _caller = _this select 2; if (local player == _caller) then { _handle = createdialog "Interaction"; } I need to show the GUI only to player using the action. Sorry if it's somewhere on these forums, but I was unable to find it. Thanks for your answers 🙂 WendAF
  7. I am trying to work on a small project of gathering all of the Ammo classnames for each vehicle in my ARMA3 Library. Currently I am using the below code on the init field of my soldier, it works but it is time consuming switch back and forth between my text document and ARMA3. I was wondering if there is a quicker way to gather the information once I have placed all the vehicles I want to check in EDEN. Thank You this addAction["Check Ammo","_mags = magazinesAmmo cursorObject; copyToClipboard str _mags;"];
  8. So i recently made a retexture of a uniform following a tutorial, at first i used the config that the tutorial used and then one that i found on the internet. But it doesn't work i was wondering if someone could help me out here. Note - i do not know how to make configs or how to code.
  9. So I have a script in my description.ext file for some custom voices but when I open the mission in the Eden Editor it gives me this error message: "C:\Users\User\Documents\Arma 3\missions\mission_name\description.ext, line 1: '.': '{' encountered instead of '='." I've looked through it about 10 times and still don't know what it's talking about, any ideas?
  10. Last content update: 6/13/2018 showing how to use the radius for addAction, using params instead of select, adding to arrays with various commands, altering arrays with various commands, get/setUnitLoadout Last content update: 6/10/2018 going through config files and getting details to sort what you want, using radius with addAction, params, and altering arrays with resize, pushBack, pushBackUnique, set, and append and going over to assist with resize count. Last content update: 5/27/2018 added GUI tutorial for how to make a weapon selector using cfgWeapon Last content update: 5/24/2018 added sector control tutorial Last content update: 5/21/2018 This is my arma 3 scripting tutorial series which is aimed to help both people getting into making their own scripts with fairly detailed simple tutorials as well as for the intermediate person looking to create their own features for their missions. The plans for this series is to almost fully cover everything behind the arma 3 missions that people play on a daily basis and have enough content provided in the videos where people can go off and make their own vision for their mission with the knowledge gained. Most of these videos are made on the fly at 1AM-4AM without any pretesting which should give someone the idea of what goes into finding syntax errors and narrowing down a bug that's causing your feature to not function properly. It is also an excuse for you to cut me some slack if you see mistakes :) . A lot of these tutorials are made with multiplayer in mind since I think most people want to play their missions online with their friends(which is why publicVariable has been utilized so much so new people can get a good grasp on the power those commands have). New videos are added to the playlist almost every day so if your stuck with something, maybe it has been covered in a video. If you have any requests on what you would like to see made then please suggest it here. topics covered so far Scripting tutorial playlist Database tutorials with INIDBI2 playlist GUI/Dialog tutorials playlist
  11. Hi all, Looking at making a Cold War scenario, but similar in style to the opening of BF1 in a kind of 'you are not expected to survive' kind of deal, is there a way to fade to black and give a message on screen when a player dies? This is for MP if it makes a difference. Thanks!
  12. ▶ What do you do on Vigor? I'm a Jr. Scripter working on creating / prototyping game mechanics and player interfaces. ▶ What is your contribution to the Vigor Team? I do my best to always be learning something new, both at work and in my personal life.. Whether it be the Czech language or an aspect of the Unreal Editor. For me, a day’s success is measured in the lessons learned. And from a technical perspective, my contributions are probably most visible in the Reward & Crate screens displaying cloud data to the player. ▶ What do you like about Vigor? I like the mentality of high risk, the high reward associated with the airdrop. I personally enjoy games that create this feeling of hypersensitivity and suspense that emotionally capture the player in a way that's unique or commonly connected with games like F.E.A.R. ▶ What do you want to see in Vigor? I hope to see more easter eggs. While there's already quite a few, I still feel there's room for more. It would be nice to hide some cleverly scripted actor within a level just to see how long it takes for the community to notice. 🙂 ▶ What do you do when you are not making Vigor? When I'm not working I do my best to stay creative and busy; that being said I try and balance my time among friends, goals & personal projects. ▶ Did game dev change your view on games and how? I think whenever your passion becomes your career, your mentality changes a bit. I thoroughly enjoy game-dev, but it certainly changes the way you experience games. I find myself far more analytical and taking longer to progress through the game as I’ve become overly detail-oriented. ▶ Your favorite games and why? I feel compelled to mention the Arma franchise, as I owe my career and love for game-dev to it. But growing up my favorite games were Banjo And Kazooie, Delta Force Black Hawk Down, and Stronghold Crusader. Unfortunately after joining Bohemia, I find myself playing games less in my free time. Hopefully, in the near future, I’ll be able to catch up on some of the recent releases. ▶ What's your favorite music, movie, show, book and why? This question has no short answer for me. But I love media that leaves the audience thinking. For example shows like Black Mirror, Maniac, or books like To Kill A Mockingbird. In regards to music, I was raised a metalhead, and spend a lot of time listening to thrash bands such as Kreator, Municipal Waste, DRI, & Testament. ▶ Is there something that you want to say to our community? Just that it's amazing to create content and receive feedback, so join the community discord and forum. ▶ You are an Outlander; humanity has fallen. What would you do? In reality, I think I’d find a nice shelter and only queue for encounters when I need essential resources. 🙂 Bonus Question (From Martin ) ▶ How do you enjoy living in Europe? What is the biggest difference for you? I absolutely love living in Europe. It seems every major European city is perfect for getting lost in for a weekend or so. Here in the Czech Republic, there are almost monthly festivities to keep yourself busy. It's a great place to live, I certainly recommend it to all my friends in the states considering careers abroad. After being here for a year it's rather hard to remember what the biggest difference was? The one that's reoccurring, and most frustrating in the summer, is that there is no ‘free’ water in Czech restaurants. You explicitly have to order it, in the states it's just always there. It's a terribly small thing but seems to be a reoccurring nuisance. Other then the one “pet peeve” I can't think of anything terribly different. Im sure theres a lot that I'm overlooking, but after a while, the Czech / European lifestyle just seems normal. 🙂
  13. 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.
  14. 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!
  15. 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!
  16. 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
  17. 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!
  18. 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.
  19. 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!
  20. 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; };
  21. 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.
  22. 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!!
  23. 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
  24. 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";
  25. 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
×