Jump to content

Search the Community

Showing results for tags 'code'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


    • ARMA 3
    • DAYZ
    • ARMA 2
    • ARGO
    • YLANDS
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Die Hard OFP Lovers' Club's Topics
  • 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


PlayStation PSN














Found 15 results

  1. Interesting problem I know. It probably is something quite simple but I can't figure it out. Now, I'm fairly new to scripting (about six months) so I'm not 100% sure what I should do. The basic premise is that the player has a UAV with an M136 launcher on it. The drone then fires that launcher. Got that part down. I've even got it so that the drone rearms when it goes back to "Home". Now, what I'd like to do is to have the players rearm it in the field. They can have a launcher on their back, bring the drone to them and then attach the launcher onto the drone. The drone has a new launcher and the player looses theirs. Here is the code that I have so far. I know that it must be very simple but any help is very much welcome in advance. For you're consideration, I'm using ACE, CBA, RHS (All four modules) and more quality of life mods. Nothing that would effect scripting in any way.
  2. So as the title states I'm curious what you all think about efficiency/optimizations when it comes to writing a lengthy script/mod for a mission. My current scripted mod is AC-C4I (Air Craft Command, Contol, Computers, Communications, & Intelligence). It has to do with sensors and targeting. The scripts have a lot of "waitUntil" commands for locking the targeting camera to screenToWorld amongst other functions. What would be the most efficient way to write this/integrate it into a mission. I can write the whole thing in one file and "call compile preprocessFileLineNumbers" on init. I can create a CfgFunctions.hpp and add it to the description.ext, or I could make it an FSM. I'd love to hear from you guys. Thanks.
  3. Server Transfer System v1.0.3 The Server Transfer System (STS for short) is an addon that allows for the transferring of players from one server to another. STS is based off the code KillZone_Kid shared with his final post here. Expanding on KillZone_Kid's work, STS hides the transfer behind an overlay, making a nearly-flawless transition from one server to another. The transfer overlay will eventually allow customization, but currently is simply a black screen with "Please Wait" up top. This addon does not handle the saving, storing, nor transferring of character data. That will need to be handled by the end user. To transfer a client, the server must remoteExec STS_fnc_Transfer. Here is an example: //TIMEOUT = Transfer timeout (time till it gives up on joining the server in seconds) //AUTOJOIN = Automatically load into servers (mission must have joinUnassigned = false; in description.ext) ["IP","PORT",TIMEOUT,"PASSWORD",AUTOJOIN] remoteExec ["STS_fnc_Transfer",-2]; LICENSING + BI Monetization Rights DOWNLOAD AVAILABLE ON STEAM WORKSHOP CHANGE LOG v1.0.3 Now packed and signed with pboProject. Added: Overlay between transfers Bug: You can NOT transfer to the same server you are connected to. Bug: Transfering to a server without -autoinit will lock the game up. v1.0.2 Tweaked: Transfer script broken down into stages Added: Transfer completed script Added: Transfer failed script Fixed: Bug causing players to autoload into all future servers after Transfer is used. Bug: You can NOT transfer to the same server you are connected to. v1.0.1 Added: Autojoin Parameter ( Automatically loads the player into the server ) ( Server Must Have joinUnassigned = false; in description.ext ) Added: CfgSTS Config for managing code that needs to run on display startup ( This is safe to use with other mods ) v1.0.0 - Original Publish
  4. VBS3 Scripting editor help needed

    Hello everybody! I am a research student working on his final thesis on a Helicopter Simulator implemented in VBS3. I would need to do some script in order to create a training field in VBS3, something like targets appearing that responde when you pass throught. I was used working with unity and there it´s easy to access the editor and code there. Here in VBS3 I think it´s different, I have seen that there is the possibility of writing and external function and name it with .sqf extension and then call it, but where do I call it in VBS3? Isn´t is possible to write some code directly inside VBS3? Are there any other ways of creating interaction between things without scripting? I wish a good day to all of you, Marco Gotelli
  5. Let me point out that I know little about codes in arma 3 and that I just started. I am trying to edit one mission that is not created by me (for private use). I have made almost all changes but there is one thing that I can't get working. Zeus on that mission is enabled but under his create tab is nothing, all empty. I have tried fixing it with the code but I cant get it working. This is the code i used to fix it: If anyone knows a way to enable that would be great.
  6. Hey, so I'm a novice when it comes to modding and coding. Iv already tried re-texturing some Arma3 content so I got the basic hang of that. However I'm trying to make a dress blue with a model from CUP. When checking the "hiddenselections", "hiddenselectionstextures" and "uniformmodel" they are all empty where as for example the beret from ArmaA 3 is "model = "\A3\Characters_F_EPB\BLUFOR\headgear_beret02a";"' Iv tried filling these out and the mod itself works. However the texture I made is not showing, only the original and I am assuming that is cause CUP models dont work the same was as the vanilla? This is the specific code for it that I have writen Can anyone explain to me why its not working?
  7. Website > Server Code | Execution System (Node.JS) Made By Optix Special Thanks to KilzoneKid for his release of the URL_Fetch DLL's V0.0.1 For those of you who do not understand or know what this is, in basic, it is a system of executing code on a server without physically being on it. How this works essentially it uses node.js to handle specific commands and does stuff with them. I personally use Glitch.Io to host my node.js server. it is a free service that allows you host your node.js project online and develop upon it live. This system contains one mod folder @Optix_WebExec which contains the necessary files that hold the Arma functions that use KK's URL_Fetch dll. This is required to make the connection to the Node.js server and pull the content that is due to be executed. BEFORE ANYONE STARTS THINKING THIS CAN BE USED MALICIOUSLY IT CANNOT ITS FULLY SERVER SIDED AND CAN ONLY BE USED IF PEOPLE HAVE THE SERVERS CORRECT LINK DEFINED IN A CONFIG! How to Use: your Node.js server link here / exec / sqf code here - This is what is used to add code to the file which Arma server checks every x amount of seconds, This can be defined in the config file found in Optix_WebExecConfig.pbo. Please note that in the case you pass any code containing irrelevant content to sqf or code containing any syntax errors currently will stop the server loop from executing correctly (Due to the errors), I have been working on a system to automatically handle and log this but had issues during the process and wanted to release asap so currently this version does not contain this feature, but stay tuned for updates in the future. your Node.js server link here / log - This is what is used to view the systems logs. The system logs events such as server connections, code added to be executed and exec list clearing. your Node.js server link here / v - This returns the current version of Arma code exec. Setup: 1) Host your node.js server using the code provided using your prefered method of hosting. 2) Install the Arma Addon onto your Server NOT Client. (This is a server sided add-on and is by no means needed on any clients) 3) Configure the config found in the Optix_WebExecConfig.pbo 4) Use the above commands to carry out the desired process. Video Showcase: Files: Download the Project here: GitHub Kind Regards, Conner 'Optix' Add me on Steam :)
  8. Preamble: From the wiki, we can use splitstring and joinstring to remove white space from code. So if we have a function like this one (from the wiki): fnc_deleteTestObj = { _this addMPEventHandler ["MPKilled", { _this = _this select 0; { deleteVehicle _x; } forEach (_this getVariable ["effects", []]); if (isServer) then { deleteVehicle _this; }; }]; _this setDamage 1; }; We can do: copyToClipboard(([fnc_deleteTestObj] joinString "") splitString toString [9,13,10] joinString "") and it returns: { _this addMPEventHandler ["MPKilled", { _this = _this select 0; { deleteVehicle _x; } forEach (_this getVariable ["effects", []]); if (isServer) then { deleteVehicle _this; }; }]; _this setDamage 1; } Which is quite nice. But I wanted a way to remove as much white space as I can (for sending code/variables over the network etc), plus I just fancied playing about with recursion. So with this function, we can use our "fnc_deleteTestObj" function again and plug it in: copyToClipboard(([fnc_deleteTestObj] joinString "") call fnc_whitespace) This returns: {_this addMPEventHandler["MPKilled",{_this=_this select 0;{deleteVehicle _x;}forEach(_this getVariable["effects",[]]);if(isServer)then{deleteVehicle _this;};}];_this setDamage 1;} I'm using joinstring in these examples as opposed to format as it doesn't have the 8k limit. Apparently formatText isn't limited and I'm not sure about str. But you could do this I suppose - just be aware it might have a limit: (str fnc_deleteTestObj) call fnc_whitespace Uses As mentioned, you could shorten variables prior to sending them over the network (then compileFinal at other end). I'm aware that programs like these exist already, but I wanted to do it in sqf (like within the engine). It should be ok but will have a problem if you do silly things like putting spaces into variables ex: player setVariable ["there are spaces in this",true]; which is a bit of a no-no imo and bad practice. You could probably obfuscate your code with this if you want but there are already good online obfuscators available anyway, and also good online de-obfuscators, like this one: http://unminify.com/ I think Dwarden said he used to do this to his mission files to make them smaller so they wouldn't suck up as much bandwidth, so theres a use for it there I suppose. Obv, I haven't tested this much but it seems ok so far - ymmv. Be aware if you use it on very large functions, then it is recursive so it might freeze your game for a few seconds. If you rename it, make sure you rename the call to it in the code as well or you will break it. Function: Here it is for any interested: fnc_whitespace = { private _noWhitespace = toArray(_this); private _anyWS = false; { if (0 isEqualType _x) then { if ([9,13,10] find _x > -1) then { _noWhitespace set [_forEachIndex,objNull]; _anyWS = true; } else { if ([34,39,94,42,40,41,123,125,91,93,59,58,62,47,43,45,61,46] find _x > -1) then { if (_forEachIndex - 1 > -1) then { if ([32,9,13,10] find (_noWhitespace select (_forEachIndex - 1)) > -1) then { _noWhitespace set [_forEachIndex - 1,objNull]; _anyWS = true; } }; if (_forEachIndex + 1 < count _noWhitespace) then { if ([32,9,13,10] find (_noWhitespace select (_forEachIndex + 1)) > -1) then { _noWhitespace set [_forEachIndex + 1,objNull]; _anyWS = true; } }; } } }; } forEach _noWhitespace; _noWhitespace = _noWhitespace - [objNull]; if (_anyWS) then { _noWhitespace = (toString _noWhitespace) call fnc_whitespace; _noWhitespace = toArray _noWhitespace; }; toString(_noWhitespace) }; And here it is compacted (ho ho ho): fnc_whitespace={private _noWhitespace=toArray(_this);private _anyWS=false;{if(0 isEqualType _x)then{if([9,13,10]find _x>-1)then{_noWhitespace set[_forEachIndex,objNull];_anyWS=true;}else{if([34,39,94,42,40,41,123,125,91,93,59,58,62,47,43,45,61,46]find _x>-1)then{if(_forEachIndex-1>-1)then{if([32,9,13,10]find(_noWhitespace select(_forEachIndex-1))>-1)then{_noWhitespace set[_forEachIndex-1,objNull];_anyWS=true;}};if(_forEachIndex+1 < count _noWhitespace)then{if([32,9,13,10]find(_noWhitespace select(_forEachIndex+1))>-1)then{_noWhitespace set[_forEachIndex+1,objNull];_anyWS=true;}};}}};}forEach _noWhitespace;_noWhitespace=_noWhitespace-[objNull];if(_anyWS)then{_noWhitespace=(toString _noWhitespace)call fnc_whitespace;_noWhitespace=toArray _noWhitespace;};toString(_noWhitespace)} Credit to @dreadedentity for his initial code HERE Enjoy!
  9. Hello im making an explosive goat script. The only problem is the 40mm keeps colliding with the goat and deactivates the 40mm. Im trying to use "disablecollisionwith" but the same thing keeps happening. view plain player addEventHandler ["Fired", { _bullet = _this select 6; _unit = _this select 0; _newPos = _unit modelToWorld [0,8,1]; _veh = createVehicle ["Goat_random_F",_newPos,[],0,"CAN_COLLIDE"]; _veh setDir getDir _unit; _veh setVelocity velocity _bullet; deleteVehicle _bullet; }]; player addEventHandler ["Fired", { _bullet = _this select 6; _unit = _this select 0; _newPos = _unit modelToWorld [0,8,1]; _veh1 = createVehicle ["G_40mm_HE",_newPos,[],0,"CAN_COLLIDE"]; _veh1 disablecollisionwith _veh; // I added this here before the projectile attatches to bullet _veh1 setDir getDir _unit; _veh1 setVelocity velocity _bullet; deleteVehicle _bullet; }];
  10. Hi, I wanted to use in my code something like this: if (damage x > 0) then {//code }; But seems like it doesn't work like that, someone could explain?
  11. Hey All - another question. How do you get to the actual code files of an existing Arma 3 model, for its properties and functions? Thanks!
  12. Greetings. I'm very new to modding, but recently I've started on adding vehicles, moving stuff around and etc. I've stumbled onto a problem with the Y-32 Xi'an Infantry Transport VTOL. I downloaded another mod which has successfully moved a vehicle from Independent to Blufor AND has a texture applied to it when you spawn it in. What I'm trying to do is basically the same. I want to copy the Y-32, put it into Bluefor and have a custom texture go on it. Inside my mod folder: Inside my mod/data folder: config.cpp script: #define true 1 #define false 0 class CfgPatches { class RTAF_Vehicle { units[] = {RTAF_Vehicle}; weapons[] = {}; requiredAddons[] = {}; }; }; class CfgEditorCategories { class RTAF_Class { displayName = "Shield"; }; }; class cfgVehicles { class O_T_VTOL_02_infantry_F { scope = 2; displayName = "Shield Y-32"; faction = "BLU_F"; vehicleClass = "Air"; editorCategory = RTAF_Class; Side = 1; crew = "B_crew_f"; hiddenSelections[] = {"camo"}; hiddenSelectionsTextures[] = {"\Y32_VTOL\data\vtol_01_ext01_shield_co.paa","\Y32_VTOL\data\vtol_01_ext02_shield_co.paa","\Y32_VTOL\data\vtol_01_ext03_shield_co.paa","\Y32_VTOL\data\vtol_01_ext04_shield_co.paa"}; class Library { libTextDesc = "BWS"; }; }; }; If anyone is able to help me out it would be very appreciated. Like i said i'm quite new to this and I've been trying for quite some time to fix it. Thank you in advance!
  13. Hi, i was playing 2 days ago Arma 3 with Exile Mod, CUP mods And CBA mod on server and without any issue But today i am trying to connect to any server with it keep me connecting and then disconnect and sometimes kicks me So i contact the admin of the server and he told me i see this error: 13:53:06 Client Ali-S - client's ticket has become invalid. Code: 6 I can only connect to servers that have Exile only with vanilla maps but any additional mods it's wont working I tried to troubleshoot this solutions: - Verified the game - Delete Savegame and MPMissionsCache folder - Downloaded all mods again - Tried from Arma 3 Launcher and A3 Launcher - Added/removed parameters - Restarted my PC and my router - Deleted my character from server - Tried new profile - Run as administrator for Arma 3 and A3 Launcher - Direct connect by using server IP Non of these helped, but the admin it could be your steam account ID is doing the issue so anyone have fix for this issue?
  14. Scripted Gear Automator What does it do? This little mission / script aims to help mission devs with dressing up their units. The result is a piece of code that can be used to fully kit out friendly and enemy units. How does it work? Simply start this mission in the editor and use the Arsenal on the box in front of you. When you’re done creating your ultimate badass simply scroll your mouse and select the “Copy to clipboard†option. BLAM! Your code is ready to be put into your mission script! Where can I get it? DOWNLOAD OR
  15. So Bohemia recently nerfed the scopes ranges so now they don't go as far is there a way I can change this on my server to get them back up higher?