All Activity
This stream auto-updates
- Past hour
-
Shahadat Hossain joined the community
-
7anime joined the community
- Today
-
mayruabatmini joined the community
-
thanhbinhtb93 joined the community
- Yesterday
-
Error 0 elements provided, 3 expected
Questioning replied to Questioning's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you! I can't believe I made such a silly mistake. It works like a charm now! -
cpekt4p joined the community
-
Livonia Ambience - An Environmental SoundSet Replacement Mod
EO replied to EO's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Steam Workshop -
(FIXED) Getting all groups from specific faction in CfgGroups
sizraide replied to sizraide's topic in ARMA 3 - MISSION EDITING & SCRIPTING
FIXED: I fixed it guys. If anyone wants to use this script for whatever purpose to gather all groups of factions and place them under each seperate category. Here it is: -
WheelAxle joined the community
-
Chat GPT tried to script
CMDR Echo3 replied to CMDR Echo3's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Wow! Thankyou so much doing this. I can't wait to test it later. I will let you know how I get on. -
weapons (WIP) Tools of The Trade(TOTT)
MattyIce01 replied to MattyIce01's topic in ARMA 3 - ADDONS & MODS: DISCUSSION
Reptilia ROF-90 Micro This project was originally started so that I can push myself to learn a new workflow and this Reptilia mount is the first mesh I've created in that workflow. I'm very happy with the first result of this new workflow. Hopefully, the results will only improve from here. -
sin888today joined the community
-
Deleting dead bodies after respawn
Harzach replied to chauvinista's topic in ARMA 3 - MISSION EDITING & SCRIPTING
All you need to do is exactly as I posted. So, create the file "onPlayerRespawn.sqf" in your mission's root folder, and paste that code snippet in it. -
Nadirali joined the community
-
Livonia Ambience - An Environmental SoundSet Replacement Mod
EO replied to EO's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Steam Workshop -
EO started following Livonia Ambience - An Environmental SoundSet Replacement Mod
-
Livonia Ambience is a config based environmental soundset replacement modification adding the environment soundsets from Livonia to various and suitable Arma 3 terrains. Features include: Environmental soundscape from Livonia. Ambient Birds - Adds crows, kestrels, eagles to the ambient system. Autumn Leaves - Wind affected leaves, grasses and pollen. (Note to mission makers, this mod doesn't create a dependency)
-
sunoltechusa joined the community
-
Theseus Services has been updated to version 1.25.1!
-
Dramacius started following Deleting dead bodies after respawn
-
Deleting dead bodies after respawn
Dramacius replied to chauvinista's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you for replying unfortunately I only understood about half of your reply. Am I able to put the code in a different file or edit it to work for a dedicated server or a combination of changes to make it work or is it just not possible? Again, thank you for taking the time to reply. -
Chat GPT tried to script
soldierXXXX replied to CMDR Echo3's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So i just finished the code you wanted. Triggers can work with CollectedItems variable. Variable is number that is tracking how many intel you handed over. To see how many items you handed over you can write: hint format ["Items i have handed over:%1",CollectedItems]; Condition in trigger might be something like this example if you have collected 13 and more items. CollectedItems > 12; The script is run from action that i demonstratively attached to player. I´ve added classic scroll menu action and hold action. Choose one you like more and delete the other one. Only change in the original code is that local variable _intelItems was changed to global variable intelItems. Why ? Because now you need to access information about array of items in more than one script (or scope to be precise). Global variables are just better for changing information on single place. I´ve also added notification, but delete it if you want. Put this whole code to init.sqf and it will work (or elsewhere if you want). This is solution for singleplayer. For multiplayer it must be done differently. You can change parameters to your liking. I´ve commented most of them. If you have questions, i´m happy to answer them. 🙂 -
Dima123123 joined the community
-
Seo profile Backlinks changed their profile photo
-
Error 0 elements provided, 3 expected
Harzach replied to Questioning's topic in ARMA 3 - MISSION EDITING & SCRIPTING
leader _x should work, as createMarker will take an object as position. -
Error 0 elements provided, 3 expected
Larrow replied to Questioning's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_x is a group, createmarker expects a position or an object. -
How do I make the .sqf script contained in my .pbo addon auto-execute immediately after starting any mission.
Larrow replied to cyberaddict's topic in ARMA 3 - MISSION EDITING & SCRIPTING
class CfgPatches { class MyAddon { units[] = {}; weapons[] = {}; requiredVersion = 1.0; requiredAddons[] = {}; }; }; class CfgFunctions { class MyAddon { tag = "TAG"; class Category { file = "MyAddon\functions"; class someScript { postInit = 1; }; }; }; }; Where the script file is named fn_someScript.sqf. postInit = 1 makes it autorun at mission post init. It would also compile it as a function called TAG_fnc_someScript, so change TAG and file path as needed. -
Chat GPT tried to script
Hanoi Mobile replied to CMDR Echo3's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Good, usefull! -
Chat GPT tried to script
CMDR Echo3 replied to CMDR Echo3's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Your a legend! the day when AI replaces us all is a long way off LOL -
Chat GPT tried to script
soldierXXXX replied to CMDR Echo3's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah that code won't work because, as I'm reading what AI wrote, there might be two situations. 1) player might have full inventory and thus can't add any item so it will just return 0. 2) player might be able to add item to inventory and the script will get stucked in while loop and since it's run in unscheduled environment it should stop around 10000 iterations and you don't want that. Pretty sure it would freeze arma if not whole PC 😄 If by any chance code worked it would have to repeat this process for x times depending on array length. However this is not what you desire. You want something much simpler and optimized. I will write the code for you when I'll return home. Basically the logic would be: Global variable of items given;//this will be good for triggers implementation Function: Count items that are relevant; Add this number to global variable; Remove all relevant items from player's inventory Currently I'm still at work, so I'll do it as soon as I'm available 😉 -
ACE Fortify Tool and Medical Tent as Medical Facility
Ganvai84 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey guys, with the latest KAT Update, the vanilla Medical Tent is now a medical facility. I would like to give my players the Option to build the medical Tent via Fortify Tool. I know how to add the tent to the List, but the problem ist, the modell of the tent has its doors closed. There are options in Eden to hide the Doors but how could i possibly make that happen via the fortify tool. Or would there be another way? As always, I have not the slightest idea how to get to work on this problem, so any kinda help would be appreciated. Cheers, Jan -
Chat GPT tried to script
CMDR Echo3 replied to CMDR Echo3's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is my convo with Chat GPT and the AI's effort at creating a script that removes all intel items and keeps count. I haven't tested it yet but thanks for pointing me in the right direction. the AI tends to make up code and syntax so it normally means i have to kind of reverse engineer what it's trying to do and fix the syntax errors. For a noob it's great for simple scripting and story ideas etc PROMPT: This is the script i use to gather intel in my arma 3 mission: private _intelItems = ["MobilePhone","SmartPhone","FlashDisk","Wallet_ID"]; /* This function will add random item to unit, if the unit has space in inventory for it. How to use the function: [ unit,//<unit> to which item should be added [],//<array of strings> array of items that function should add (this array can´t be empty) 0,//<scalar> number that will be randomized. (default:10) 0//<scalar> number that should be always lower than number randomized. The lower the number is the higher is the chance that unit will have the item generated. If number is 0 every unit will have random item selected (default:0) ] spawn soldierXXXX_fnc_randomItem; Example:[player,["FirstAidKit"],10,1] spawn soldierXXXX_fnc_randomItem; */ soldierXXXX_fnc_randomItem = { scriptName "RandomItem"; params ["_unit","_itemsArray",["_RandomNumber",10],["_RandomNumberLow",3]]; private _addIntel = round random _RandomNumber; if (_addIntel < _RandomNumberLow) exitWith {}; private _randomItem = selectRandom _itemsArray; if (_unit canAdd _randomItem) then { _unit addItem _randomItem; }; }; { [_x,_intelItems,10,6] spawn soldierXXXX_fnc_randomItem; } forEach units opfor; Can you create a script that removes all required items from my inventory and keeps count of how many I have handed in ANSWER: Sure, I can provide a script for that. This script will go through your inventory and count and remove all items listed in _intelItems /* This function will remove and count certain items from a unit's inventory. How to use the function: [ unit, //<unit> whose inventory will be checked array //<array of strings> array of items that function should remove and count ] call soldierXXXX_fnc_removeAndCount; Example: [player, ["MobilePhone","SmartPhone","FlashDisk","Wallet_ID"]] call soldierXXXX_fnc_removeAndCount; */ soldierXXXX_fnc_removeAndCount = { scriptName "RemoveAndCount"; params ["_unit", "_itemsArray"]; private _itemCount = 0; { if (_unit canAdd _x) then { while {_unit canAdd _x} do { _unit removeItem _x; _itemCount = _itemCount + 1; }; }; } forEach _itemsArray; _itemCount }; /* To use the function and display the count of items removed, you can use: */ private _count = [player, ["MobilePhone","SmartPhone","FlashDisk","Wallet_ID"]] call soldierXXXX_fnc_removeAndCount; hint format ["You have handed in %1 items.", _count]; This function will remove all instances of the items in the _itemsArray from the inventory of the _unit and count how many items have been removed in total. The count is then returned by the function. The last part of the script calls the function with the player as the unit and displays a hint with the total count of items removed. -
Chat GPT tried to script
CMDR Echo3 replied to CMDR Echo3's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ha, I think it probably did! Anything before Sept 2021 and Chat GPT has probably read it lol I've found that GPT uses and tries to adapt lots of content found in this forum especially GPT 4 that has Bing internet search integrated. I will just be using it in single player. Thanks in advance for the speedy reply -
Maybe this has already been discussed somewhere, but I couldn't find it, so I apologise in advance for possibly repeating a question that has already been asked here before. If there is a forum thread where it has already been discussed, send me the url. I created a .pbo file, which connected as an addon to the arma. With this, I figured it out. In general, I want my script runs every time I start any mission in arma3. I have config.cpp and the script itself with script.sqf file in the same folder. The sqf so far uses the hint call script just to check its auto-run. I've already tried everything and nothing happens after starting the mission or starting the game in the editor. My cpp file contains this but didnt work: class CfgPatches { class MyAddon { units[] = {}; weapons[] = {}; requiredVersion = 1.0; requiredAddons[] = {}; class Extended_InitPost_EventHandlers { class MyAddon { init = "call compile preprocessFileLineNumbers 'script.sqf';"; }; }; }; }; What's the best practice for this now?
-
Deleting dead bodies after respawn
pierremgi replied to chauvinista's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Normal. There is no player on dedicated server. Use the code @Harzach wrote for onPlayerRespawn.sqf you can add in your mission root folder, or use the missionEventHandler "entityRespawned" If I'm right, onPlayerRespawn.sqf will fire locally (player's PC). missionEventHandler "entityRespawned" is also LE (local effect). So, even if you place it in init.sqf, only the respawned player's PC will run the code, even if the MEH is present on all PCs. That means a little difference. You can have respawning AIs (when AIs are playable but not played). onPlayerRespawn.sqf will not fire for these AIs, but MEH will.