Search the Community
Showing results for tags 'pylons'.
Found 8 results
-
Respawn Expressions Issue(s)
EveryEmpireFalls posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello! First | The basic premise of what I am attempting to do is two-fold. A) respawn existing vehicles (of different types - i.e. some jets, some helicopters, some ground vehicles), with the same custom pylons - for the jets/helis - set by the pylon/dynamic loadout editor in 3den. This part works fine thus far (see below). And B) apply unlimited ammo on a delay (i.e. it takes 45 seconds for the ammo to restore) to both the original vehicle and its respawned clone. The main trouble I am having is getting unlimited ammo to work with the new, respawned vehicles. Second | A code dump and summary of what is where: The code below is my unlimited ammo expression in the existing F/A-181 (and other vehicles). Ideally, the missiles & bombs refresh on a delay, hence the {sleep 45} segment. This part works perfectly for my purposes. this addEventHandler ["Fired",{[_this select 0,getNumber (configFile/"CfgAmmo"/(_this select 4)/"explosive")] spawn {if (_this select 1==1) then {sleep 45};_this select 0 setVehicleAmmo 1}}]; This code is present in the expression of a Game Logic and synced to all relevant air vehicles. It works perfectly for my purposes; no errors and functions as intended. [this] call { if (!isServer) exitWith {}; params ["_thisObject"]; _vehs = synchronizedObjects _thisObject; _initScript = { params ["_vehicle", ["_pylons", "none"]]; if (typeName _pylons == typeName []) then { private _pylonPaths = (configProperties [configFile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]) apply { getArray (_x >> "turret") }; { _vehicle removeWeaponGlobal getText (configFile >> "CfgMagazines" >> _x >> "pylonWeapon") } forEach getPylonMagazines _vehicle; { _vehicle setPylonLoadout [_forEachIndex + 1, _x, true, _pylonPaths select _forEachIndex] } forEach _pylons; }; }; { [_x] call _initScript; } forEach _vehs; [_vehs, _initScript] spawn { params ["_vehs", "_initScript"]; sleep 1; _respawnlist = []; { _respawnlist = _respawnlist + [[_x, position _x, [vectorDir _x, vectorUp _x], getPylonMagazines _x]] } forEach _vehs; while { true } do { sleep 1; { _veh = _x # 0; _respawnpos = _x # 1; _playerdistance = 200; { if (_veh distance _x < _playerdistance) then { _playerdistance = _veh distance _x }; } forEach allPlayers; if (!alive _veh || (_veh distance _respawnpos > 20 && _playerdistance > 20)) then { _vehType = typeOf _veh; [_veh, _respawnlist] spawn { params ["_veh", "_respawnlist"]; deleteVehicleCrew _veh; _veh lock true; _inSpawn = false; waitUntil { sleep 0.5; _inSpawn = false; { _respawnpos = _x # 1; if ((_veh distance _respawnpos) < 30) exitWith { _inSpawn = true; }; } forEach _respawnlist; _inSpawn || ((speed _veh == 0) && (isTouchingGround _veh)); }; if (!_inSpawn) then { sleep 30 }; deleteVehicle _veh; }; sleep 10; _newveh = _vehType createVehicle _respawnpos; _newveh setPos _respawnpos; _newveh setVectorDirAndUp (_x # 2);[_newveh, _x # 3] call _initScript; _respawnlist set [_forEachIndex, [_newveh, _respawnpos, _x # 2, _x # 3]]; }; } forEach _respawnlist; }; }; }; This is the current code present in the "System Specific - Vehicle Respawn" Module expression (not its Init). It does not work at all. params ["_newVeh", "_oldVeh"]; [_newVeh addEventHandler ["Fired", { [_newVeh select 0, getNumber (configFile/"CfgAmmo"/(_newVeh select 4)/"explosive")] spawn { if (_newVeh select 1 >= 0) then { sleep 5 }; _newVeh select 0 setVehicleAmmo 1 } }]] call BIS_fnc_initVehicle; The Vehicle Respawn Module: It throws the no errors upon mission launch and no errors upon vehicle respawn. My friends and I suspect it is not even executing properly. Here are a few screencaps of the 3den editor of the scene in question if it helps you: // Overview of the whole airfield. The Vehicle Respawn Module on the Right by the center of the airfiled is exlusively linked to ground vehicles. It respawns the vehicles fine but without the unlimited ammo. // The test F/A-181. // The Game Logic. // My two primary test subjects (Left is experimental; Right is the control). As you can see, the left F/A-181 is the primary test subject for the Vehicle Respawn Module, as it is synced to both the Vehicle Respawn and the Game Logic. The right F/A-181 (and all other air vehicles) is synced only to the Game Logic. Both jets initially spawn with the proper pylons/dynamic loadouts and unlimited ammo, as expected vis-a-vis the 3den editor settings. Both jets respawn with the proper pylons/dynamic loadouts. Neither jet respawns with unlimited ammo, currently. I feel close to solving this, but I am blind to what I am missing/adding unnecessarily. I have tried numerous other variations with even less luck. I am sure there is some redundancy between the Vehicle Respawn Module and the game logic, and I would appreciate any simplifications there. However, that is a secondary concern. Thanks for reading this far! Hopefully, you can help me and anyone else who wants to do this. -
Retexuring the weapon pylons for the Gryphon
Arische Mustasche posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
I need help retexuring the weapon pylons for the Gryphon from the Jets DLC. I am making the whole underside of the jet a bit darker, and it has worked great. However the pylons doesn't seem to change colour when i use my costom skin, even if it seem like the pylons textures are in the same texturefile as the fuselage of the jet. To make everything clear, The fuselage itself is working correctly, but the pylons holding the missiles aren't changing textures. Does anyone have any experience with retexturing and know why the pylons aren't changing colour? While testing the costom paa files i am using the Extended Debug console to place them on the aircraft. -
Description : Small ingame loadout cheanger for planes and helicopters, save and load custom presets In game '?' is only in english, if some one know english and russian perfectly any help will be accepted How to import it in your map/scenario? Just add following text in files, and obviously files downloaded -description.ext class CfgFunctions { #include "ZLoad\functions.hpp" }; #include "Zload\defines.hpp" #include "Zload\dialogLoadout.hpp" #include "Zload\dialogHelp.hpp" #include "Zload\dialogSave.hpp" -initPlayerLocal.sqf [player,"MarkerNameFromEDITOR",20] spawn zlo_fnc_CreateZone;//[PLAYER,MARKERNAME,RADIUS] -onPlayerRespawn.sqf [player,"MarkerNameFromEDITOR",20] spawn zlo_fnc_CreateZone;//[PLAYER,MARKERNAME,RADIUS] -stringtable.xml just add all from file in mission to your stringable.xml(if exists, else just put in your mission folder) -in editor add marker to use in scripts, it will be the marker near the menu will apear (ps:sorry for my bad english) Exemple : _Radius_From_center = 20; [_OBJ_TO_ADD_ACTION,"Zone_Center",_Radius_From_center] spawn zlo_fnc_CreateZone; #v1.0 First Release Download <-> Steam Workshop
- 2 replies
-
- 7
-
- loadout
- dynamic loadout
-
(and 4 more)
Tagged with:
-
Two questions about pylon weapon configs, and pylon scripting
Nick Seafort posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hi fellas, I've been scratching my head over these for a while now and not getting any closer to figuring out what's going on. I've tried the Discord a few times, but I think these questions may be a bit lengthy for that and haven't gotten any responses! Situation: finalising adding pylons and associated scripting for our modpack's helicopters, and these differ from vanilla helos in that: a) they may have both a pilot and gunner controlling pylon weapons simultaneously (rather than all pylons controlled by one or other), and b) who controls each particular pylon varies between different presets of the same vehicle. First issue: a "SAFE" weapon that we include as the first weapon for all vehicles vanishes ONLY IF the pylon loadout is altered in the mission editor. So, we have fairly standard SAFE weapon added as the initial weapon for both pilot and gunner. The weapon is defined with a magazine name that doesn't exist, and when we specify the magazines[] for the vehicle we just include nothing - so the players see a read "SAFE" weapon with no rounds that they have to swap off to actually fire anything. Having added pylons to the helicopters, these still work just fine upon loading into a mission. HOWEVER, if I alter the pylon loadout in the editor at all (via the vehicle's attributes pane, and simply swapping one ammo-type for another ammo-type for the same weapon for the pilot, for instance), then both the pilot and the gunner don't have the SAFE weapon show up any more - their initial weapon is the next in the list/first pylon, and cycling through all weapons reveal it's missing. Has anyone else experienced this, or have an idea what might be causing it? I've checked other mods out and they don't seem to encounter the issue, but I can't spot anything in their configs that reveals an obvious difference. The only workaround I can think of is to rip all weapons off on spawn and then re-add them as well as the static weapons/magazines as part of the init... but this is obviously not a great solution and also runs into the second issue. Second issue: I cannot find a reliable method via scripting to determine which seat controls which pylon station. As an example, if the vehicle's default loadout has the pilot controlling two wingtip stations and the gunner controlling two inboard stations, then if this is changed in the editor so that actually they've swapped so the pilot controls the inboard stations and the gunner the wingtip stations then I can't see any way to find this information out. As I'm trying to finalise the in-mission rearming GUI for pylons, this means that currently I have to try and guess who controls which pylon initially (to pre-set the ownership options on loading the GUI) and then store that in a custom variable after this to facilitate behaviour for the rest of the mission. It also means that I can't accurately workaround the first issue by removing and re-adding weapons/magazines due to not know the actual order to reattach them in to retain all the same animation/behaviour. It also means that the guessing function is a bloody awful nest of loops and array comparisons, with lots of checks to ensure the totals match after each step etc. Is anyone able to offer insight into either of these points? If more convenient, I'm available to chat via Discord or TS - just let me know ☺️ -
I am currently in the process of making a GUI that allows you to customize the pylons of a plane. Everything works up until this one part. (This is not the only thing in the GUI, just one function). params["_indexWeapon"]; _weaponToEquip = currentWeapons select (_indexWeapon + 2); _planeToEquip = currentObject; _pylonToEquipIndex = currentPylonNum + 1; systemChat str _pylonToEquipIndex; systemChat str _planeToEquip; systemChat _weaponToEquip; (_planeToEquip) setPylonLoadOut [_pylonToEquipIndex, _weaponToEquip, true, []]; For some reason, in the setPylonLoadOut, the _weaponToEquip does not work. So say it equals "PylonRack_1Rnd_AAA_missiles". I get the error in game, "No entry 'bin\config.bin/CfgMagazines."PylonRack_1Rnd_AAA_missiles"'. But if I change the code to, (_planeToEquip) setPylonLoadOut [_pylonToEquipIndex, "PylonRack_1Rnd_AAA_missiles", true, []]; It works if I use that code. I can't seem to figure out why this is and what a fix for it might be. If anyone has any ideas why this is and what a fix might be, I will be extremely grateful for your input. Thanks in advance!
-
Adding an option to change pylon loadouts in missions
Ex3B posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So I want to be able to make a mission where a vehicle can be brought back to a certain place, and have its pylon loadout changed. So far the best I've got is a set of repeatable triggers (with conditions to ensure the aircraft is in the designated area) that are activated by radio (ie radio alpha/bravo/charlie) to change the pylon loadout of the aircraft. What I would like to do is have these loadout options added to the action menu of the craft, instead of being radio options. For one thing, if I want to make multiple loadout types for multiple types of aircraft, there just aren't enough radio commands. Is this possible? Can anyone point me int the right direction to writing such a script? -
How do I make a jet respawn with the correct texture and pylons?
Haammaar posted a topic in ARMA 3 - EDEN EDITOR
I've made an addon that adds a texture to the texture list in "edit Vehicle Appearance" on the gryphon, but I can't figure out a way to keep the vehicle appearance and the pylon settings for the jet after respawn. Any ideas? -
How do I make a jet respawn with the correct texture and pylons?
Haammaar posted a topic in ARMA 3 - EDEN EDITOR
I've made an addon that adds a texture to the texture list in "edit Vehicle Appearance" on the gryphon, but I can't figure out a way to keep the vehicle appearance and the pylon settings for the jet after respawn. Any ideas?