Jump to content

PortalGunner

Member
  • Content Count

    70
  • Joined

  • Last visited

  • Medals

Everything posted by PortalGunner

  1. In my opinion hints should be a last resort as so many scripts use them. Is it a viable option to have a fake LED on the radio interface that acts as the "Transmitting" light (long-range radio could have something on the LCD screen)? Or possibly a fake switch/button that gets pushed in whenever you're transmitting? Possibly not viable but I'm just trying to think of options. Also, does this mean you plan to readd the Support Channel becoming available for gunners, commanders etc.? If I may, could I request this feature be optional? Kind of removes the point of my 'Artillery & Pilots only' script. The way our missions play out I'd rather not have every tank able to have access to the Support channel. I think the only use our group has for the Global Channel is communicating with Zeus when he's changed sides. We usually do it over Discord, but sometimes its nicer to do it in-game (I know AFAR doesn't support Zeus yet). As such I'm content with losing access to that. I think the only other thing I can think of to mention is that it would be useful if we had a classname array we could add radios from mods to (like Radio Backpacks = long-range radio access; ACE radio; etc.). Probably not important at this point but something to think about. Anyway, don't rush the release!
  2. I'm free most of the time if you need another tester. (Though when I post this it is 9:30pm here) I actually didn't know Global was forced for admin - so I guess that's why I had it. And although I would request you eventually add the Allied channel, I understand if that's out of the scope of the addon. At the same time I hope the support channel is more compatible with mid-mission application of the RTO trait (or was that replaced completely by the list?) ^^;
  3. I think that interface is pretty out of the way, so 👍 I honestly thought it would take longer so if it's coming out in the next week or two then.. awesome! Also, just want to get some confirmation on your plans for Global chat - it was available in the same way Direct was in the last release, which didn't seem right. At the same time if Allied channels are completed that would be cool! But either way I'm glad you decided to rewrite this addon.
  4. So the script I posted in my previous comment successfully manages who has the RTO traits, but it seems with some initial testing there's some problems with AFAR recognising the changed trait when its applied. Is there something I can call that will refresh it? Thanks.
  5. How do you reckon I should go about adding RTO to all Pilots (and possibly Artillery too)? I noticed auto-adding was removed with v0.8, but don't know how to replace that functionality (atleast elegantly) for just the two roles I mentioned. Sorry if I'm asking so many questions btw ^^; If I might suggest something, could the auto-adding be added as a toggle in CFG.sqf? Or was there another reason it was removed. I hope you continue development phronk! Edit: Going to try this Edit2: Got it working:
  6. Hi. So I thought I would add a mission parameter to our Zeus template to allow the Dynamic Groups System to be toggled at mission start. Turns out now I can't disable it. This is what I have right now: The first time I ran the commands in case 1, the dynamic groups system was enabled. However when I restarted the mission (and MP server) with the parameter set to Disabled, I was still able to press the Team Switch button and access the UI. Stumped, I even completely removed the parameter and .sqf file and restarted the game, and it was still on. So I readded the script/param and inserted the Terminate code, yet it still won't disable. It messes with ACE group management, so I'd really like to get this fixed. It's possible I'm missing something simple but I am very confused. Edit: I believe it's a problem within 'mission.sqf' because it happens if I remove all other files. As to where within it I have no clue. Here's a link. I have a workaround (updated code above) but I still don't understand why it's enabling in the first place.
  7. That sounds good to me 👍 I believe I tried it without an eventHandler and it still wouldn't work. Works fine on your pre-made mission though 😕 I'll keep looking for a solution.
  8. Knowing myself I've probably done a stupid and that's why this hasn't worked, but I've put: this addEventHandler["Respawn",{(_this select 0) setUnitTrait ["RTO", true, true]}]; In the inits of two units, and neither of them get the support channel when they load in to the game. They're ungrouped and within 100m of each other, with radios. I hope it's something simple I've missed. Tested with players and AI in the slots. Edit: Aside from that I think LSValmont makes a good point. The interference/distance feature is not the only unique feature AFAR gives us, and it's certainly a worthy mod even without it.
  9. Hi, I'm creating a mission parameter that deletes all pre-placed props (under Empty) in case our Zeus wants to change our spawns occasionally. So far this is what I have in the script: What would I need to set as _objects to detect props? And will it detect and remove objects I've checked "Simple Object" on as well (if so that would be great)? I would like to be able to set a variable on objects in the editor to exclude them from this as well. Any help is appreciated, thanks! Edit: working code
  10. But I'm assuming I don't have to if they are on the same layer that I'm getting through getMissionLayerEntities.
  11. I never actually noticed layers were a thing.. You'd think I would have by now. Thanks. Are objects I've checked "simple object" on in the editor removeable with my above script?
  12. I'm not sure that's actually relevant to the script. From wiki: https://community.bistudio.com/wiki/say3D
  13. Let this comment be a vote for continuing this project 👍 Phronk explains what the exploit is here. If it's true that BIS has added something that allows player muting, then the exploit can be fixed. Uh.. did you read the features list? And no there isn't supposed to be any radio distortion effect.
  14. Hi there, It's quite annoying when someone else has used the gunner seat of a Heli, offsetting its position, and you later decide to Manual Fire from the pilot's seat and have a misaligned gun. I've been putting a lot of effort into setting up a script that can deal with this via a User Action, however I'm getting a few errors. A few of them are about missing " ) ", " ] ", " ; " (though I have done my best to never leave these out, including using a bracket checker plugin), or invalid variables (which is probably because it's checking a variable before it's set). To summarise, when a player pilot is in an armed Heli, they shall get a user action to centre the turret. This will have either the current AI or a temporary, invisible AI in the gunner seat target a spawned marker in front of the vehicle (if a player is in the seat it won't affect them). I currently have five six files in relation to this. EDIT: Below has been updated to the latest working script - If you get errors make sure there's no invisible characters using Word It requires CBA mission.Malden\init.sqf mission.Malden\description.ext mission.Malden\functions\functions.hpp mission.Malden\functions\fn_centreTurret.hpp mission.Malden\functions\fn_allowCentreTurret.sqf mission.Malden\functions\fn_turretDir.sqf Currently, unit spawning, marker generation and AI watching are working as intended, however the user action does not appear and if i set off turretdir.sqf manually ( [] execVM "turretdir.sqf"; ) it errors. EDIT: All working as intended. I'm not as proficient at SQF scripting as I'd like to be, so I've probably made some very obvious mistakes. Any help setting this up correctly and optimising would be appreciated. I will keep trying in the meantime.
  15. Thanks for the effort - I might look at doing that later but for now I'd rather not redesign the entire thing. I have put all the scripts into functions though so they precompile (updated OP).
  16. If you wanted to account for both turrets you could check for second seat using FullCrew and if it exists add a second AI inside turretDir.sqf .
  17. - I'm using CBA's Extended Event Handlers to load centerTurret.sqf onto anything with class Helicopter. - I don't want to look for an empty gunners seat because I want to still be able to use the action if an AI is in the seat (which is what the else in turretDir.sqf is for). FullCrew works well enough for this. - Would there be any significant advantage to launching it as a function? I'm aware it will precompile it but I'm not sure if it would really do much for the script - it would only get use a few times a session at most. - Also yes, he runs a regular listen server (not the best decision, I know) for his discord group. He hasn't the hardware for dedicated and I haven't managed to convince him to let a few of us pay for server hosting. EDIT: I set the target of the AI to objNull (in the 'else') rather than follow the same script because if I did, after lining it up they'd just go back to an 'untargeted' state anyway.
  18. Automatic code? Like centring the turret when nobody's in the gunner seat? Well TBH our server host doesn't have the best CPU so I would like to avoid as many loops as I can. Plus someone might have some obscure reason to keep it uncentered.
  19. Yep, for some reason those invisible characters were the cause of those errors. Works perfectly now. Unless you can think of any further optimisations I think that's all I can do. I will update OP with working script.
  20. Wow that is weird. I'll test it tomorrow.
  21. No inverted commas in my scripts u~u but knowing me its entirely possible it's some minuscule thing.
  22. I actually did change it to doTarget on the one I sent the error of (my only change) - it happens on both doTarget and doWatch If I comment out only the waitUntil, I get the same error. If I comment out everything related to _pencil (leaving the waitUntil alone) I get: And if I comment out everything related to _pencil as well as the waitUntil, there's no error. So it's somewhere in the lines of _pencil or waitUntil. Dunno if that helps.
  23. Seeing what I can do with this, but something is wrong: // [] execVM "turretDir.sqf"; allowCenterTurret = false; // disallow further instances of script _veh = vehicle player; // set current player's vehicle as script object if (_veh emptyPositions "gunner" > 0) then { // check if the gunner seat is empty _group = createGroup civilian; // if so create a temporary unit to fill slot _group deleteGroupWhenEmpty true; _unit = _group createUnit ["B_Soldier_F", position _veh, [], 50, "NONE"]; _unit setCaptive true; _unit allowDamage false; _unit hideObjectGlobal true; _unit setSpeaker "NoVoice"; _unit setName "Turret Control"; _unit assignAsGunner _veh; // move the temporary unit to gunner seat _unit moveInGunner _veh; _epsilon = 0.001; // minimum difference between vectors _vec = vehicle _unit; _pencil = "Land_PencilRed_F" createVehicle [0,0,0]; _pencil allowDamage false; _pencil hideObjectGlobal true; _pencil attachTo [_vec, [0,5,0]]; _unit doWatch _pencil; _sleeptime = time + 10; waitUntil { sleep 0.1; (time >= _sleeptime) || (((_vec weaponDirection (currentWeapon _vec)) vectorDistance (vectorDir _vec)) < _epsilon); }; deleteVehicle _unit; // remove temporary unit deleteVehicle _pencil; allowCenterTurret = true; // allow further instances of script } else { // if the gunner seat is NOT empty _unit = gunner _veh; // set current gunner (AI/player) as script object _unit doWatch objNull; // order unit to watch nothing (defaults to forward) allowCenterTurret = true; // allow further instances of script }; I'm getting an Invalid Number error after "_pencil = "Land_PencilRed_F" createVehicle [0,0,0];"
  24. Something like this I guess? // mission.malden\inq\turretDir.sqf 0 = _turretUnit spawn { _this doWatch (vectorDir (vehicle _this)); waitUntil { ([(vehicle _this) weaponDirection (currentWeapon (vehicle _this))] call INQ_fnc_computeSourceDir) == ([vectorDir (vehicle _this)] call INQ_fnc_computeEndDir); }; }; // mission.malden\functions\fn_computeSourceDir _SourceX = [_this select 0, 4] call BIS_fnc_cutDecimals; _SourceY = [_this select 1, 4] call BIS_fnc_cutDecimals; _SourceZ = [_this select 2, 4] call BIS_fnc_cutDecimals; [_SourceX, _SourceY, _SourceZ] // mission.malden\functions\fn_computeEndDir _EndX = [_this select 0, 4] call BIS_fnc_cutDecimals; _EndY = [_this select 1, 4] call BIS_fnc_cutDecimals; _EndZ = [_this select 2, 4] call BIS_fnc_cutDecimals; [_EndX, _EndY, _EndZ] I haven't tested it yet. Is there a better way to round out the decimals to 4 places?
×