-
Content Count
344 -
Joined
-
Last visited
-
Medals
Everything posted by thy_
-
sandbox [Release] Vehicles Overhauling script
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Check this topic. Maybe it will help you: -
istouchingground isTouchingGround bug with non-vehicles or am I missing something? [SOLVED]
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Working as gold in dedicated server as well 😉 Sorry for the delay. -
I'm finishing a script to release soon but I am facing an annoying bug around isTouchingGround I guess. // scope: checking if the "special boxes" are in good conditions: // _specialBox = _x; if ( !(isTouchingGround _x) OR (underwater _x) OR (speed _x > 0) ) exitWith { ["The box doesn't meet the conditions to work!"] remoteExec ["systemChat", _eachHumamPlayer]; }; What I expect: if the box/object is NOT touching the ground, or is under the water, or even is moving, that message above MUST shows up to the player. What is happening now: Even the object touching the ground, not underwater and totally stopped, the message is running for the player. Tests: If I remove just that piece "!(isTouchingGround _x)" everything runs as fine as possible with that important feature missing. I already checked the syntax and looks correct. I did a few investigations (below) about isTouchingGround bugs but no clue what exactly I am facing here. https://www.reddit.com/r/armadev/comments/fal7ko/whats_wrong_with_my_code/ https://forums.bohemia.net/forums/topic/149495-istouchingground-help-needed/ What am I missing?
-
How to know if the vehicle has or not (true or false) weaponry? I mean, turret position or driver with this ability (as Air vehicles)? // NOT WORKING if ( {_vehPlayer weaponsTurret} count > 0 ) then { hint "Your veh has guns like someone from Texas..." } else { hint "This veh's kind of Brithish policeman..." };
- 11 replies
-
- detecting
- vehicle weapons
- (and 4 more)
-
checking How to detect if the veh has weaponry positions and needs to rearm? [SOLVED]
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
After some months, here is my solution (v2.0) for rearming:- 11 replies
-
- detecting
- vehicle weapons
- (and 4 more)
-
Hey @scottb613, a strategy I'm using in the new (and unpublished yet) version of the Vehicle Overhauling Script is to read with kind of ammo magazines the vehicles got, remove them with looping and, after that, add each new magazine again. _object = _this; _type = typeOf _object; _magazines = getArray(configFile >> "CfgVehicles" >> _type >> "magazines"); if (count _magazines > 0) then { _removed = []; { if (!(_x in _removed)) then { _object removeMagazines _x; _removed = _removed + [_x]; }; } forEach _magazines; { _object addMagazine _x; } forEach _magazines; }; _count = count (configFile >> "CfgVehicles" >> _type >> "Turrets"); if (_count > 0) then { for "_i" from 0 to (_count - 1) do { _config = (configFile >> "CfgVehicles" >> _type >> "Turrets") select _i; _magazines = getArray(_config >> "magazines"); _removed = []; { if (!(_x in _removed)) then { _object removeMagazines _x; _removed = _removed + [_x]; }; } forEach _magazines; { _object addMagazine _x; } forEach _magazines; _count_other = count (_config >> "Turrets"); if (_count_other > 0) then { for "_i" from 0 to (_count_other - 1) do { _config2 = (_config >> "Turrets") select _i; _magazines = getArray(_config2 >> "magazines"); _removed = []; { if (!(_x in _removed)) then { _object removeMagazines _x; _removed = _removed + [_x]; }; } forEach _magazines; { _object addMagazine _x; } forEach _magazines; }; }; }; }; _object setVehicleAmmo 1; // Reload turrets / drivers magazine Hope this piece of code brings ideas for you.
-
visual studio [VS CODE] Tutorial: how to config VS Code for Arma 3 (2024)
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
😉 -
Pretty sure I'm stepping through a basic question but, really, I've TRIED hard all this afternoon to find out on my own how to make the forEach understand the array content are trigger variable names already dropped in place via Eden Editor. myTriggersVarNames = [ "myTrg1", "myTrg2", "myTrg3" ]; while {true} do { // Doesn't work: { if (player inArea _x) then { systemChat "Player inside the trigger"; }; } forEach myTriggersVarNames; // Working fine: /* if (player inArea myTrg1) then { systemChat "Player inside the trigger" }; */ sleep 3; }
- 4 replies
-
- triggervarname
- foreach
-
(and 4 more)
Tagged with:
-
basic How to storage trigger's var names in array, and then call them through forEach loop? [SOLVED]
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Forget. 🤣 If the Trigger's array got one or more vanames and those triggers don't exist on Eden Editor, the "Error Undefined Variable" is shown up. Thanks.- 4 replies
-
- 1
-
- triggervarname
- foreach
-
(and 4 more)
Tagged with:
-
basic How to storage trigger's var names in array, and then call them through forEach loop? [SOLVED]
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
You right, @Harzach. I didn't notice, even though with the error below, that forEach works in my tries with no quotes. Some advice to avoid this error? It says the trigger var names are not defined. How can I define them since they're just triggers?- 4 replies
-
- triggervarname
- foreach
-
(and 4 more)
Tagged with:
-
Hey there, hope this message finds you well. I just read a bit around this below, but no clue how I'll know through the code if the player's vehicle is amphibious. All I want is a bool value as a return. https://community.bistudio.com/wiki/CfgVehicles_Config_Reference#canFloat I've already investigated: https://community.bistudio.com/wiki/BIS_fnc_objectType https://community.bistudio.com/wiki/isKindOf https://community.bistudio.com/wiki/typeOf
-
amphibious How can I code to know if the player's vehicle can float in water? [SOLVED]
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Works as gold. Thanks! -
HELP Detecting units from a group in triggerarea
thy_ replied to Spriterfight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Worked as gold. Thanks. -
Thanks, @pierremgi For you that won't download the file above: 0) Drag and drop the convoy vehicles, connecting each other to be the same group; 1) Copy and paste the code line below in the INIT of the group composition; if (isServer) then {this execVM "TOV_fnc_SimpleConvoy.sqf"}; 2) Into your mission folder, create the file TOV_fnc_SimpleConvoy.sqf, adding in its content: // Original Bohemia Forums post: https://forums.bohemia.net/forums/topic/226608-simple-convoy-script-release/ params [["_convoyGroup", grpNull],["_convoySpeed", 50],["_convoySeparation", 50],["_condition", {false}]]; systemChat str _convoyGroup; _convoyGroup setFormation "COLUMN"; _convoyGroup setBehaviour "SAFE"; private _vehicles = vehicles select {group _x == _convoyGroup}; systemChat str _vehicles; { _x limitSpeed _convoySpeed*1.15; _x setConvoySeparation _convoySeparation; driver _x setCombatBehaviour "CARELESS"; } forEach _vehicles; waitUntil {sleep 5; (!isNull _convoyGroup) && !(call _condition) }; { _x limitSpeed _convoySpeed*1.15; _x setConvoySeparation _convoySeparation; driver _x setCombatBehaviour "CARELESS"; } forEach _vehicles; _convoyGroup enableAttack true;
-
Added. Using it. Somehow, the script doesn't work properly anymore. As @YarnoR said, (and even with just the vanilla loaded) the vehicle behaviors are awful in my tests, going out of the way at the beginning. Look by your self and any help could clarify for many of us: https://drive.google.com/file/d/1CaNtFI2zwSY3SRtokWRdC-j33PXtHOmJ/view?usp=sharing
-
sandbox [Release] Controlled Spawn And Waypoints Randomizr (CSWR)
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Script has been updated o/ Aug, 10th 2022 | v2.5 Now it's possible to customize the loadout for each spawned faction; Documentation has been updated. The first post was updated as well! -
sandbox [Release] Controlled Spawn And Waypoints Randomizr (CSWR)
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Script has been updated 😄 Jul, 14th 2022 | v2.1 Added "Stealth" as an option for spawned units/vehicles; Improved the vehicle creation, now each vehicle has its electronics/signals configured when available; Improved the Editor option to turn On and Off a faction; Documentation has been updated; The first post was updated as well! -
multiplayer How to make my playable area lighter for server?
thy_ posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey, I help some help to improve this: The script does: for dedicated and hosted servers, a multiplayer playable area control based on a trigger area (with Y, X, Z) dropped through Eden Editor, where, if some player leaves that area, that specific player is punished immediately and, if there is a vehicle with them, the vehicle must be destroyed too. Improvement desired: as the script is loaded by description.ext | cfgFunctions and the script checks all players alive (they are able to respawn) as long the match goes, the desire is to improve those lines, remembering my dedicated server runs, sometimes, til 30 players. Ps.: for now, the target is just human players, not considering AI units out there. Here we go: fn_PAC_init.sqf: if (!isServer) exitWith {}; private ["_playersAlive", "_isPlayableArea"]; [] spawn { while { true } do { _playersAlive = (allPlayers - (entities "HeadlessClient_F")) select {alive _x}; { // forEach _isPlayableArea = _x inArea PAC_playableAreaControl; // Eden trigger if !(_isPlayableArea) then { [_x, 1] call THY_PAC_fnc_setDamage; }; } forEach _playersAlive; sleep 5; }; }; fn_PAC_globalFunctions.sqf: THY_PAC_fnc_setDamage = { params ["_target", "_damage"]; ["You left the playable zone!"] remoteExec ["systemChat", _target]; sleep 0.1; if !(isNull objectParent _target) then // checking if the player is in vehicle { vehicle _target setDamage [_damage, false]; }; _target setDamage _damage; }; On Eden Editor: Dropped a trigger and name it as "PAC_playableAreaControl". Share your thoughts, it will be very much appreciated. thy- 3 replies
-
- playable area
- dedicated
-
(and 1 more)
Tagged with:
-
sandbox [Release] Vehicles Overhauling script
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Btw... Trying to fix two bugs related to ACE and the repairing service: 1) When a vehicle is cooking-off inside the repair station service range Expected: vehicle be unavailable for any service; Today: the vehicle gets repaired meanwhile its turret is burning; As I did not find out a bool in ACE Cook Off Framework documentation that tells me if the vehicle is cooking-off, I gave a go with the lines below but of course, it doesn't work well for many reasons. // ACE Compatibility: if ( VO_isACErun ) then { _veh setVariable ["ace_cookoff_enable", false, true] }; // cook off disabled. // Repairing code... // ACE Compatibility: if ( VO_isACErun ) then { _veh setVariable ["ace_cookoff_enable", true, true] }; // cook off enable. 2) Looking for how ACE vehicle damages work Expected: when the vehicle gets hit by loose wheels/tracks/turrets, it should be enough to get repair service; Today: the APC loses all its wheels and the turret gets red color however the vehicle doesn't start repairing when close to the station; ACE Vehicle Damage Framework One of the conditions when ACE is not running: damage _veh > VO_minRepairService // vanilla Vo_minRepairService = 0.1 Any clue? -
sandbox [Release] Vehicles Overhauling script
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
interesting idea @pierremgi, sure it can bring light to some modification. The VO script shows those asset lists just as suggested options for the editor and not as mandatory. For example, the ground refuel service is configured just with two assets in my last mission, turning off all other services and doctrines. VO_grdRefuelAssets = [ "B_T_Truck_01_fuel_F", "B_Truck_01_fuel_F" ]; And about this: For script focus, VO is aiming at vehicle needs only. -
execvm null = [ ] execVM vs execVM vs remoteExec BIS_fnc_execVM
thy_ posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
In the last two weeks, I spent A LOT of my days off to understand programming (I'm not a true one) and Arma scripts syntaxes and etc... Of course, lots of questions came over and some of them that are not clear at all is how to call (in each case) an external piece of code (.sqf) through the init files (init.sqf / initServer.sqf / initPlayerLocal.sqf). Yeap, I've read about them also... and init.sqf is the priority when the mission starts, meanwhile initServer and initPlayerLocal has no guarantees of execution order. Got it, but and how and why call some external scripts like these down below? // init.sqf null=[] execVM "myScript.sqf"; execVM "mySecondScript.sqf"; "andAnotherScript.sqf" remoteExec ["BIS_fnc_execVM"]; What I'm trying to get: https://community.bistudio.com/wiki/Event_Scripts https://community.bistudio.com/wiki/execVM- 6 replies
-
- 1
-
- init.sqf
- initplayerlocal.sqf
-
(and 1 more)
Tagged with:
-
execvm null = [ ] execVM vs execVM vs remoteExec BIS_fnc_execVM
thy_ replied to thy_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey me from the past, you got wrong. That time was your first time set attention over "FUNCTIONS" topic so that was confusing, but today is a bit clearer. When you use CfgFunctions through Description.ext, you will use while-looping as well, but sometimes we create a file like "fn_PAC_globalFunctions.sqf" or something like that where we set ONLY FUNCTIONS, passing a wrong idea that you are not using while-looping or for-looping but in another file (where you are calling FUNCTIONS) you are. hehe. Cheers. You from the future.- 6 replies
-
- init.sqf
- initplayerlocal.sqf
-
(and 1 more)
Tagged with:
-
How can I identify only land vehicles when they approach specific class names from an array? I wouldn't like to use given ID names to identify objects as "obj01", but use the object class name as "Land_RepairDepot_01_civ_F". My idea is just to drag and drop in Eden Editor that kind of object and the script does what it must do. I'm reading about these things but I need some kickoff help from you guys. typeOf - https://community.bistudio.com/wiki/typeOf isKindOf - https://community.bistudio.com/wiki/isKindOf BIS_fnc_objectType - https://community.bistudio.com/wiki/BIS_fnc_objectType I've found this relationship somewhere: "CfgVehicles" "All" "AllVehicles" "Land" "LandVehicle" "Car" "Car_F" "Wheeled_APC_F"
-
allmissionobjects How to identify land-vehicles when they approach a classname object?
thy_ replied to thy_'s topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Here I am back! Finally, I have finished the idea and built it as an applicable script for everyone: There, you will get how I am identifying kinds of objects automatically, with no code on Eden Editor, even triggers. Hope it might help someone. -
Help with a Simple Random Spawn Script
thy_ replied to HaggisRoll's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I just forgot to tell you, guys. Here is the final script, (recently updated) working as gold for multiplayer (hosted and dedicated) and single-player missions. 😉 Cheers.