Jump to content

Ulfgaar

Member
  • Content Count

    143
  • Joined

  • Last visited

  • Medals

Everything posted by Ulfgaar

  1. What im making here is an AI air-taxi for a persistent campaign thats been rolling for soon two months (with resets to server ofc) - but where we are now, players will still spawn at our HQ - but have an option for transport to the FOB in question when our flyboys are not online. To do this, i've placed an AI chopper having a pilot and co-pilot, following a circle of waypoints which will fly players to the FOB, and return to base for another run whenever needed. {_x In AllPlayers} count (crew Heli1) > 0) This part tho, is counting if all players are in the heli, no? As im not after having it as a requirement to have all the players be in, and thought that counting the crew of the helicopter being more than the two that is supposed to be there be what is counted. If i understood your suggestion right, its counting if there are more than 0, which would then make the 2 AI always present trigger that particular code, no? And what i need, is for the triggers "Set Waypoint Activation"-sync to the waypoint preventing it to leave to fire. As said, my version is giving me the hints, so the triggers are firing - but the trigger seemingly is not "releasing" said waypoint - so the chopper does not go anywhere.
  2. I tried a workaround, with a trigger just detecting if player was in the helicopter, that the helicopter is on the ground in the given trigger (covering the helipad) and that the hint is only broadcast to players within said trigger. This is the trigger that activates immediatly once conditions are met - hint shows up: Activation: BLUFOR Activation Type: Present Condition: {isTouchingGround Heli1} count thisList > 0 && count (crew Heli1) > 2 && (vehicle player) in thislist; On Activation: Hint "Transport helicopter will take off in 30 seconds. To abort - leave the helicopter."; On Deactivation: Hint "Transport helicopter - Take off aborted."; This is the trigger that activates after 30 seconds has passed, and which is "set Waypoint Activation" synced to the waypoint that releases the helicopter - once conditions are met, and the hint shows up: Activation: BLUFOR Activation Type: Present Condition: {isTouchingGround Heli1} count thisList > 0 && count (crew Heli1) > 2 && (vehicle player) in thislist; On Activation: Hint "Helicopter taking off!"; Timeout: 30 sec But again ,working on singleplayer and multiplayer through the editor - the hints show up on dedicated server, but does jack shit in regards to releasing the waypoint. Why the helicopter trigger does not release the waypoint of the helicopter however....it just breaks my head in. I've made dedicated server missions for years, using all sorts of conditions to activate triggers, which would put an AI group onto its planned path by using a trigger and its "set Waypoint Activation" - however, now all of a sudden this simply does not work.
  3. There seem to be some sort of delay with this on the server, where the hint is executed immediatly, while the "set Waypoint Activation" engages a fair time after...no idea why. But, i have on the server experienced some sort of delay in commands when playing as Zeus as well, like manually setting codes in the MCC init box of units (This SetVehicleAmmo 1; ...etc.). A more coding-savvy friend of mine helped me out with a different code which i'll be going with instead. Truth be told, the code is used previously is actually a code originally made for counting members of a group being inside a vehicle, i just did a hack-saw attempt at what i thought would be to count players, instead of a given group. This is the new code im going for to check if players are out (tho, not checking if players are out - but when there are only 2 left, all players are out - as pilot/co-pilot and helicopter are invulnerable so there should be no chance of either of them dying for some reason). count (crew Heli1) == 2;
  4. Yes, i know im responding to an old thread - but been "told off" before about not using "old threads" on the same topic. So either i cant make a new thread about the same topic, or i cant respond to old threads with the same topic. Anywho - its a recent thing, and this is just one example. I see no reason why it should not work on the dedicated server tho, when its working when testing it elsewise. And as said, the trigger fires - i can see the hint, but the helicopter does not move beyond waypoint 1. And then there are the other triggers not activating anymore, those that did just a few days ago - i cant figure out why not, and searched the web. This thread came up - so if said someone found a fix, i'd like to know what it was. @Larrow Ok right - so basically i dont need to refer to the helidpad at all, it'll just select it because thats where the waypoint it attached? I'll sort that out. edit: Changing that did nothing on the dedicated server - issue persists. But, basically what happens is that the triggers fires, hints are showing - but the effects of said triggers does nothing. This goes for both the trigger in question which i've written about above - but also on older triggers that have been working previously, for a very short time ago.
  5. I can comfirm, also having weird problems on my dedicated server now with trigger firing, but nothing happening still. Just discovered the issue when testing an "air-taxi" for the players to be moved from HQ, to the FOB by AI flying back and forth. AI helicopter with variable name "Heli1" with the following init field: Heli1 addAction["<t color='#6D1300'>Take Off</t>", {TakeOff = 1;}, [], 1.5, false, true, "", "true", 5, false, "", ""]; This AllowDamage False; nul = this spawn { waitUntil { if !(alive _this) exitWith {}; if (fuel _this < 0.50) then { _this setFuel 1 }; false }}; First Waypoint - on the helidpad (variable name BasePad1) with waypoint activation: Heli1 land "BasePad1"; Second waypoint - a regular "move" waypoint directly ontop of that again, "Set Wapypoint activation"-synced to a trigger with the following info: Repeatable: Yes Condition: TakeOff == 1; On Activation: Hint "Heli-Taxi Trigger Fired"; TakeOff = 0; Third waypoint - on the destination helipad (variable name FOBAPAD) with waypoint activation: Heli1 land "FOBAPAD"; Fourth waypoint - a regular "move" waypoint directly ontop of that again, "Set Wapypoint activation"-synced to a trigger with the following info: Repeatable: Yes Condition: {_x in Heli1} count (units player) == 0; Fifth waypoint - a "Cycle" waypoint linked to the first waypoint. Basically, when testing it in the editor both on single player and in multiplayer - you have the addAction "Take Off" available once you are close/in the helicopter, which is immune to damage (crew as well) and getting endlessly refuled once the heli reaches 50% fuel. It will then fly to the FOB helipad, land and stay there till all players have left the helicopter. It will then return to the HQ helipad, land and wait for another activation of the "Take Off" addAction. What happens when on trying this on the dedicated server - i get in the helicopter. I trigger the addAction command, i get the hint (Heli-Taxi Trigger Fired) telling me that the trigger has been activated - but nothing happens. Its like the triggers function of activating the waypoint did not happen, and as such we're stuck. I then noticed other triggers that previously were working, no longer working either - firing, but not executing as such. This only happens on my dedicated server, everything works fine as said when testing in singleplayer or multiplayer through the editor.
  6. We start off in our base, where people kit up for the mission. During mission when people die, they respawn in with the gear they had when they died - and they have a range of options for respawns, in anything from respawn tents of their squads - a forward medical vehicle, or back at HQ (whereupon they will need to be transported back to the front). So no, they dont reload their loudouts after each death - they for the most part continue the fight with what they had when they died up until ressupply points have been arranged. Also, gear is loaded using addAction options on gearcrates, which executes different loadout.sqf scripts. We do this to ensure that players only have what they are permitted depending on their role, with some extra boxes containing "limited" other gear which they can change out. Quick question too: Whats the difference between: private _unit = param [0, player]; vs _unit = this select 0; ? Will check new codes.
  7. I've tested your script @nkenny and it works for the InitLocalPlayer.sqf _handle = execVM "AssignInsignia.sqf"; - where players spawn in their default "base" uniform with patches and everyone can see their own and each others patches. However - when not using onPlayerRespawn.sqf players spawn in with no insignia. When i try to use it, and refer to your script in the same way with: _handle = execVM "AssignInsignia.sqf"; players still spawn in without their insignia (not visible to themselves, or others). However, when i do this to your script, adding the [_this,''] call BIS_fnc_setUnitInsignia; to remove the insignia before reapplying them: /* assignInsignia.sqf configures unit insignia Argument 1, unit <OBJECT> Return unit */ // init private _unit = param [0, player]; // switch-case private _insignia = _unit call { [_this,''] call BIS_fnc_setUnitInsignia; if (str(_this) in ['Wolf1']) exitWith {"SPAR_WOL1"}; if (str(_this) in ['Bear1']) exitWith {"SPAR_BEA2"}; if (str(_this) in ['Lion1']) exitWith {"SPAR_LIO3"}; if (str(_this) in ['Rhino1']) exitWith {"SPAR_RHI1"}; if (str(_this) in ['Scorpion1']) exitWith {"SPAR_SCO"}; }; // add insignia [_unit, _insignia] remoteExec ["bis_fnc_setUnitInsignia", 0]; // end _unit people respawn and can see their own insignia, but others cannot. When i add: _handle = execVM "AssignInsignia.sqf"; to the end of the loadout scripts, the same happens. You equip new gear - and you can see your own insignia, but other players cannot. So basically - same problem persists. And i've also have no idea on how these insignias will show for JIP players. The reason why i have it for both InitLocalPlayer.sqf and onPlayerRespawn.sqf - as well as when changing loadouts - is because in our games, we start the game with "base uniforms", i.e - a uniform with just the Unit branch beret. I still want players to show off what squad they are part of for the briefing etc. Once they start their missions, they will select their loadouts according to what role they have selected, and when that happens - i still want them to show their Squad identity. Then lastly, when they are killed in battle and spawn in with the gear they had when they died, and then try get back into the battle - i still want them to show the squad insignia. So i need 4 things to happen: - When players spawn into the server, they need to have their squad ID insignia applied. - When Players change loadouts, their squad ID insignia needs to be applied/reapplied. - When they respawn after death, their squad ID insignia needs to be applied/reapplied. - All players joining the game, should see the insignias present on the players already in the game, and vice versa. The list above is whats doing my head in tbh xD. So that throughout their game - they will always show and carry their squad ID insignia - from the role they selected from the lobby (aka, selecting a role within said squads).
  8. As said, i'm no scripter - so what i have is what i've adapted and put together like frankenstein from a myriad of threads and pages where this or similar things have been discussed. So with that in mind, when you @nkenny say that the "this string check could definitely be optimised"...im not sure how to. I'll do some testing with what you've provided me with here. And again, thanks folks - really appreciate the help!
  9. Thanks man, thats a good start - will do the changes and have a look. Luckily im not remote executing the SetUnitInsignia on the live server - but testing it on the test file.
  10. Too much to get into? Basically, im after a way to have shoulder insignias visible for players on a dedicated server, which is JIP friendly and "reliable" (or as reliable as you get them in Arma). Im not talking about the "Units" group badge, but custom squad patches.
  11. Could this be an option to ensure shoulder insignia visibility for all clients both connecting and respawning on the server? initPlayerLocal.sqf { if (str(player)in ['A1','A2']) then { [player,'TTB_Alpha'] call BIS_fnc_setUnitInsignia; }; if (str(player)in ['B1','B2','B3','B4','B5','B6']) then { [player,'TTB_Bravo'] call BIS_fnc_setUnitInsignia; }; if (str(player)in ['C1','C2','C3','C4']) then { [player,'TTB_Charlie'] call BIS_fnc_setUnitInsignia; }; } remoteExec ["bis_fnc_call", 0, True]; onPlayerRespawn.sqf: { if (str(player)in ['A1','A2']) then { [player,''] call BIS_fnc_setUnitInsignia; [player,'TTB_Alpha'] call BIS_fnc_setUnitInsignia; }; if (str(player)in ['B1','B2','B3','B4','B5','B6']) then { [player,''] call BIS_fnc_setUnitInsignia; [player,'TTB_Bravo'] call BIS_fnc_setUnitInsignia; }; if (str(player)in ['C1','C2','C3','C4']) then { [player,''] call BIS_fnc_setUnitInsignia; [player,'TTB_Charlie'] call BIS_fnc_setUnitInsignia; }; } remoteExec ["bis_fnc_call", 0, True]; And if I add into each script for each preset loadout to say execute the contents of one of these scripts, could it work then, to ensure that each player is wearing said roles shoulder insignia at all times? Or will i be fucking up some majorly with server performance or other shit? Im trying to put together stuff i dont really know too much about, so some help here would be nice :)
  12. Player load in with insignias, but as soon as they change to preset loadouts (loadouts which has no identity lines), it dissapears. Is there a way to script into preset loadouts that they will sport the insignia which was used by the person who cliked it?
  13. Alright, think i figured it out - just in case anyone else is looking for this - i'll show everyone the end result. So in the initPlayerLocal.sqf you have this: if (str(player)in ['A1','A2']) then { [player,'TTB_Alpha'] call BIS_fnc_setUnitInsignia; }; if (str(player)in ['B1','B2','B3','B4','B5','B6']) then { [player,'TTB_Bravo'] call BIS_fnc_setUnitInsignia; }; if (str(player)in ['C1','C2','C3','C4']) then { [player,'TTB_Charlie'] call BIS_fnc_setUnitInsignia; }; And then you have in the onPlayerRespawn.sqf: if (str(player)in ['A1','A2']) then { [player,''] call BIS_fnc_setUnitInsignia; [player,'TTB_Alpha'] call BIS_fnc_setUnitInsignia; }; if (str(player)in ['B1','B2','B3','B4','B5','B6']) then { [player,''] call BIS_fnc_setUnitInsignia; [player,'TTB_Bravo'] call BIS_fnc_setUnitInsignia; }; if (str(player)in ['C1','C2','C3','C4']) then { [player,''] call BIS_fnc_setUnitInsignia; [player,'TTB_Charlie'] call BIS_fnc_setUnitInsignia; }; initPlayerLocal.sqf will add insignias to the designated units as you enter the game, while onPlayerRespawn.sqf will first remove said insignia, and reapply them on respawn. I've tested it on dedicated server, solo however, but it seems to work on both loading in and on respawn. If its JIP friendly, or if other people can see the insignias remains to be seen. I think it will, as technically these scripts will fire every time someone logs onto the server, and on every respawn. I will update once i've gotten around to test it with multiple other players.
  14. Sorry to bring up an older thread - but im struggling with the same. If you guys found a solution for this, i'd very much like to know. Im the content creator for my A3 group, and we have our own mod with custom shoulder patches for each squad. I'd want these patches to be on "by default" to the role they select - so if they are in a role in squad 1, they get the patch of squad 1 - if they are in a role of squad 2 they get the patch for squad 2. player addEventHandler ["Respawn", { [this,""] call BIS_fnc_setUnitInsignia; [this,"SPAR_WOL1"] call BIS_fnc_setUnitInsignia; }]; Am i right to understand that this was the "solution" you ended up with @Bormann2 (this ofc my variation)? If not, would you add what ended up being your working solution for unit shoulder patches working on dedicated servers, even after respawn? And are you using the code in the units init field, or in the "onPlayerRespawn.sqf" script? And is this solution JIP friendly?
  15. In my groups standard training map (Malden 2035), I’m trying to add some "automated" events, if they are triggered. To enable this, I’m using repeatable trigger, and .sqf files. One trigger will activate simulation of, enable dmg to and set the AA ammo count to 100%, for each time its triggered - and the opposite after the time runs out. This works flawlessly. However, the other which will initiate air combat, with AI aircraft spawning and taking off from the given airport (north-western one, on the small island), seem to be triggering "double" every time, making the AI spawn inside each other and explode. The Trigger parameters: Type: None Activation: Blufor Activation Type: Present Repeatable: Yes Condition: this On Activation: _handle = execVM "AirCombat1.sqf"; On Deactivation: (Blank) The SQF file looks like this: _veh1 = createVehicle ["rhssaf_airforce_o_l_18_101", getmarkerpos "JetSpawn1", [], 0, "NONE"]; createVehicleCrew _veh1; _Veh1 setPos [677.568,12285.216,0]; _Veh1 SetDir 90; _Veh1 domove (getmarkerpos "SND1"); _veh1 Flyinheight 1500; Sleep 15; _veh2 = createVehicle ["rhssaf_airforce_o_l_18_101", getmarkerpos "JetSpawn2", [], 0, "NONE"]; createVehicleCrew _veh2; _Veh2 setPos [620.538,12285.126,0]; _Veh2 SetDir 90; _Veh2 domove (getmarkerpos "SND1"); _veh2 Flyinheight 1500; Sleep 600; _Veh1 domove (getmarkerpos "JetSpawn1"); _Veh2 domove (getmarkerpos "JetSpawn1"); Sleep 150; {deleteVehicle _x;}forEach crew _Veh1; deleteVehicle _Veh1; {deleteVehicle _x;}forEach crew _Veh2; deleteVehicle _Veh2; When I preview this on multiplayer in the editor, it works perfectly - but as said, once I play this on the dedicated server, it’s like it fires the .sqf file twice in a row, making the first two jets spawn inside each other with like half a second apart, and then the second jet do the same - twice, with just half a second apart. This ofc results in a spectacular firework, and 4 dead jets - even though the script should technically just spawn 2. So, I need some help in figuring this out. I’m no advanced script-head - I for the most part find what i need, alter and combine and it for the most part works. But here I think I need more knowledgeable help. As always, it will be much appreciated! Regards, Ulfgaar
  16. First off, i had a brainfart writing the first post - what im talking about is not "ASL" (i've edited it now) - but the MK41 VLS cruise missile launcher that were introduced with the vanilla destroyer. My appologies for that. Map: NOGOVA, from "CUP Terrains - CWA". HAA1_0 = CSAT Tigris (Vanilla) T1 = CSAT Otokar Arma APC (Vanilla) T2 = CSAT Otokar Arma APC (Vanilla) Cruise1 = MK41 VLS Launcher on the front deck of destroyer 1 (Vanilla) Cruise2 = MK41 VLS Launcher on the front deck of destroyer 2 (Vanilla) Cruise3 = MK41 VLS Launcher on the front deck of destroyer 3 (Vanilla) The script is activated by a trigger firing the designated .sqf file with the above mentioned script, activated by anyplayer entering it: execVM "CM1.sqf"; This is the modlist we're using - however none of the involved parts are from any mods, but from the vanilla game (and belonging DLC's). SPAR - Core Mods As said, it has worked'ish before when testing the mission on the dedicated server - but just not reliably, and unfortunatly on the actual playthrough of the mission with the group they just fired straight up - with no apparent intent of flying towards their designated target.
  17. Thanks a bunch, both for your patience and your help. Big of you. I'll get on those rules. 👍
  18. Well, im no hardcore coder - so the locality part is vague for me. As i understand it, triggers are local - so i assumed then that when i run this code with a trigger, it will trigger locally? The thing is, its not working - and its the finishing touches of the mission, to have them blasted to the ground and take damage in what will be a fairly "traumatic" experience - but ofc one that will leave them to continue the game. If the answer is there with 4 exclamation marks, and people still ask - how about explain what that means, rather than assume that everyone knows what it means? Assumption is the mother of all fuck ups, etc.. So yes, im asking because i need someone to explain to me how to do this, as i've not figured it out - that should be quite apparent imo. Cant i use a code similar to what i've tried using with a trigger? Do i have to use a trigger to remoteExec an .sqf file? Not least, is there a code - or a good way - to make this code apply for all players on the map? Or do i have to target each player with each their line of code? See - im asking because i need help. Im not asking if you can re-read what it already says here.
  19. Shamelss bump - if anyone knows, i need this for the sweet oh sweet polish to finish my campaign mission - the extra little shazham! Cheers 😄
  20. Trying to make an experience that can be played on dedicated server where there is a massive explosion near players, but for gameplay reasons the explosion itself wont be deadly just for show. Instead i want to have a trigger with the correct codes to apply "targeted damage" to the players, so that they will get hurt, but not die or get critically injured (as they are to continue the play). I've tested the code above, which works when using singleplayer, or hosting multiplayer from the editor - but it simply does nothing when i test it on the dedicated server. Anyone able to help me? With a code that targets all players in the game as such? Or do i have to do this for every single player it's supposed to hit? Im currently trying this, which works in locally hosted multiplayer - but still nothing on the dedicated. Its being used in a trigger. {_x playAction "PlayerProne"; [_x, 0.8, "leg_r", "bullet"] call ace_medical_fnc_addDamageToUnit;} forEach playableUnits;
  21. There seems to be some issues with CBA after updates today. Dedicated server will not start with the following error: And on my personal computer CBA is tagged as "corrupted" in the A3 launcher. Hoping for a fix 😉
  22. In the age where more and more platforms are allowing simultanious cooperative work in documents and the like, i have a dear wish for Arma 3, or the next iteration of it - that a similar functionallity is implemented to the games editor. In the same way that one can host local games on your computer, you could host an "editor session", where multiple creators could work simultaniously on a mission. This would be a great asset for communities and assorted creators alike. I know there is a "merge" function now, but thats really not the same. Having this "cooperative editor mode" would be just what the community needs, and would be a massive tool for clans and groups to also help teach others the ropes of working with the editor, no matter where in the world they are located. A bohemia Arma 3 cloud service could be arranged, or simply as stated above - one person hosts the editor session, while other creators join in. I would really love something like this! Thoughts? Regards, Ulfgaar.
  23. Greetings mighty oracle (all you bad ass coders and scripters). Im the content creator in a medium sized community - and one thing that has been pestering our helicopter pilots, is that players tend to go nuts with the doormounted guns while flying back to base. I've offered to sort our choppers out with AI gunners, which is a simple process. I've also got a fair idea on how to utilize an addaction together with turning off simulation on/off of said AI gunners so that the pilot can activate/deactivate the AI doorgunners as he see fit and need. However, im bit puzzled on how to make it so that only the pilot seat has access to said addaction command. Anyone out there that has an idea on how to do this, in an efficient and proper way using either a code to use in the vehicle init or in an sqf script? Any help is appreciated! Best regards, Ulfgaar.
×