JCataclisma
Member-
Content Count
207 -
Joined
-
Last visited
-
Medals
Everything posted by JCataclisma
-
Trigger to Disable AI
JCataclisma replied to Trickshot1994's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello! Try and take a look at this video from Gunter, who's also a member here in forums. I dare to say it will help you a lot by solving that. Also, perform a search for "hunt" in his channel, so you will find some really cool ideas for those "garrison-and-hunt" situations. -
How to check if helicopter already has specific weapon?
JCataclisma replied to JCataclisma's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Bullseye! It works. But it only blocks the script whether the Skyfire is the selected/active weapon, regardless the player is inside or outside the helicopter. I forgot to mention that I kept the original 20mm twin minigun ("M134_minigun"), so if I let it selected, the script will be executed "infinitely". So I added a little extra to your suggestion, and now it works as expected, even when the whole ammunition for any or all weapons is finished. if !((_currentVehicle currentWeaponTurret [-1]) isEqualTo "rockets_Skyfire" || (_currentVehicle currentWeaponTurret [-1]) isEqualTo "M134_minigun") then Thank you! Currently working code for Czapla: private _nearbyVehicles = nearestObjects[player, ["Helicopter"], 25]; { private _currentVehicle = _x; if (typeName _currentVehicle == "OBJECT" && (typeOf _currentVehicle in ["I_E_Heli_light_03_dynamicLoadout_F"])) then { if !((_currentVehicle currentWeaponTurret [-1]) isEqualTo "rockets_Skyfire" || (_currentVehicle currentWeaponTurret [-1]) isEqualTo "M134_minigun") then { _currentVehicle lockTurret [[0], true]; _currentVehicle setCollisionLight true; _currentVehicle removeWeaponTurret ["missiles_DAR",[-1]]; _currentVehicle addMagazineTurret ["168Rnd_CMFlare_Chaff_Magazine", [-1]]; _currentVehicle addWeaponTurret ["rockets_Skyfire",[-1]]; _currentVehicle addMagazineTurret ["38Rnd_80mm_rockets",[-1]]; _currentVehicle addMagazineTurret ["38Rnd_80mm_rockets",[-1]]; _currentVehicle setPylonLoadOut [1,"PylonRack_19Rnd_Rocket_Skyfire",true]; _currentVehicle setPylonLoadOut [2,"PylonRack_19Rnd_Rocket_Skyfire",true]; }; }; } forEach _nearbyVehicles; -
How to check if helicopter already has specific weapon?
JCataclisma posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, guys! I am running a script in a dedicated server, which is working great, but I would need to improve it. We have a random building which was chosen as an especial workshop point. Whenever any player get nearby, they'll be able to click an action while looking at the building. This action will execute a script in SQF file, which we called "searcher". This "searcher" will check for nearby vehicles (25 meters) and, whether it finds some specific vehicles, it will run a different SQF script file for such vehicle. In this case, it's for a WY-55 Czapla helicopter, and it will do as follows: private _nearbyVehicles = nearestObjects[player, ["Helicopter"], 25]; { private _currentVehicle = _x; if (typeName _currentVehicle == "OBJECT" && (typeOf _currentVehicle in ["I_E_Heli_light_03_dynamicLoadout_F"])) then { _currentVehicle removeWeaponTurret ["missiles_DAR",[-1]]; _currentVehicle addWeaponTurret ["rockets_Skyfire",[-1]]; _currentVehicle addMagazineTurret ["38Rnd_80mm_rockets",[-1]]; _currentVehicle setPylonLoadOut [1,"PylonRack_19Rnd_Rocket_Skyfire",true]; _currentVehicle setPylonLoadOut [2,"PylonRack_19Rnd_Rocket_Skyfire",true]; }; } forEach _nearbyVehicles; So far, it works great. But such action is free for any player which brings the helicopter nearby. And if the player decides just to click the action several times, the script will continue to add more and more and more missiles into the helicopter. NOW, comes the question: would you suggest and help about how could I avoid such repeated/infinite running of script? I believe the best way here would be to add some check at the beginning of the script, so that it would just NOT run the script at all. So my thought was to request a check whether the vehicle already has installed the very type of missiles the script would add to it, and if so, the script would NOT continue. I have searched the forums, but I am lost regarding what function could I try to add in the code bellow for such a check, as I receive one error after another, probably regarding syntax, but I cannot figure out where or "why" the error is there, even with the Arma3's editor pointing it out. Please check the line #6 if that could be the proper approach. private _nearbyVehicles = nearestObjects[player, ["Helicopter"], 25]; { private _currentVehicle = _x; if (typeName _currentVehicle == "OBJECT" && (typeOf _currentVehicle in ["I_E_Heli_light_03_dynamicLoadout_F"])) then { if (!(_currentVehicle /*WHAT SHOULD I TRY HERE?*/ [-1, "rockets_Skyfire"])) then { _currentVehicle removeWeaponTurret ["missiles_DAR", [-1]]; _currentVehicle addWeaponTurret ["rockets_Skyfire", [-1]]; _currentVehicle addMagazineTurret ["38Rnd_80mm_rockets", [-1]]; _currentVehicle setPylonLoadOut [1, "PylonRack_19Rnd_Rocket_Skyfire", true]; _currentVehicle setPylonLoadOut [2, "PylonRack_19Rnd_Rocket_Skyfire", true]; }; }; } forEach _nearbyVehicles; -
Land transportation
JCataclisma replied to Cruiser1092's topic in ARMA 3 - MISSION EDITING & SCRIPTING
We had something very similar more than 20 years ago for our Operation Flashpoint missions, and it worked fine but NOT for AIs boarding. The AI driver usually did a nice job if there were not too many obstacles, so it would always reach marked (waypoints) bus stops, wait for a few seconds for whichever players wanted to board/disembark, then follow to its next bus stop, and always looping, looping, looping around. But we had the bus set to no-damage/invincible, so the services would continue even if enemies ended up shooting the players inside. And the main "secret" is on that said by pierremgi, but our true, most common result, was always closer to what fn_Quiksilver and mikey74 said. 😂 -
[Release] Addon-Free ArmA Radio
JCataclisma replied to phronk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Awesome! thank you for the feedback. Cheers! -
Saros Tweak For Higher FPS On Maps
JCataclisma replied to sarogahtyp's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Has anyone tried this script/mod for Invade & Annex framework on dedicated servers? -
[Release] Addon-Free ArmA Radio
JCataclisma replied to phronk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, Phronk! I don´t know whether you´re still rocking upon such work of yours, but I wonder if it would be possible to have an additional "Group-like" radio channel, but a somehow subscribe-able one, like the extra channels inside Quiksilver´s Invade&Annex framework ...? So that the server could have the main channel voice shut, making audio available only for the players which decide to activate such new radio. Cheers! -
sandbox [Release] Vehicles Overhauling script
JCataclisma replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Have just returned to "Arma 3 Editing" and absolutely LOVED this script!