Jump to content

reggaeman007jah

Member
  • Content Count

    152
  • Joined

  • Last visited

  • Medals

Everything posted by reggaeman007jah

  1. Hey folks, I have a system in my MP mission that uses emptyPositions command to find out how many free cargo slots a heli has, I then use this to inform my spawner, and spawn exactly that number of units (and get them to board the heli when it lands at base). This usually works without issue - until that is, players start to use that heli also. If I do an initial AI drop, then come back in to pick up and deploy players, on the next AI pickup I will spawn enough for the free slots but a few AI won't board. The number of refuseniks seems to correlate to the number of players I just deployed, so I am assuming this is bc somehow the players are still allocated to their cargo positions even though the emptyPositions shows them as empty. As I land with AI, I do the usual unassign heli stuff. Do I need, say, an EH (getOut, on the heli) that unassigns the unit if that unit is a player? Or is there an easier way to do this? Cheers
  2. reggaeman007jah

    Looking for advice on emptyPositions command

    Hey folks, So after some experimentation, I've come to realise that players, when leaving a vehicle, will remain assigned to that vehicle up until the point they enter a new vehicle. In the above script I manually unassign AI when they disembark, but I guess players don't have the unassign carried out on them automatically when they exit vehicles. So my hacky workaround was to add a getOut EH on the relevant helis, and ifPlayer, reassign them to another vehicle. Not elegant, but it works, now no more AI boarding issues 🙂 Thanks everyone for taking the time to try and assist with this.
  3. reggaeman007jah

    Looking for advice on emptyPositions command

    So I now know (at least I think this is right) that players in MP do not unassign themselves when leaving vehicles, and remain assigned to (say) a heli seat even after disembarking, and only changing/updating when they get into another vehicle. I thought I could use a getOut EH to unassign the player manually as they get out, but that didn't solve the issue. Any ideas anyone?
  4. reggaeman007jah

    Looking for advice on emptyPositions command

    So, re-checking the trigger, I am looking for 'any players'. So the return from thisList is the player. _passed = _this select 0; // thisList _pilot = _passed select 0; _heli = vehicle _pilot; _freeCargoPositions = _heli emptyPositions "cargo"; So the above takes the player caught in the trigger, and puts it into 'thisList'. thisList select 0 grabs the name of the player, and from there I get the heli the player is in. I then get the free cargo slots of that heli, and use that number as an informer to the spawner part of the process, i.e. only spawning the number of units equal to the number of free slots. This all works fine most of the time, but as soon as players start using the same heli, there seems to be an issue caused whereby units are spawned (according to the number of free cargo slots), but not all of them get in. So, my theory is that when a player gets out their seat is somehow still assigned to them on exit? And this leftover assignment is stopping the AI from boarding. I hope that all makes sense. Any ideas?
  5. reggaeman007jah

    Looking for advice on emptyPositions command

    Hey man, thanks for the thoughts on this. I will of course check this, but this collection of scripts seems to work without issues when just boarding AI, it is the inclusion of players into the mix that seems to mess up the boarding numbers.
  6. reggaeman007jah

    Looking for advice on emptyPositions command

    Alright here is the code. Apologies in advance to all here, it's not good, I know this. I scrabble together what I can and try to improve/refactor where I can. It does work for the most part, but yeah probably a painful read. Firstly, I have a trigger area in the mission, activated (repeatedly) by players inside the trigger zone. On activation it does this: call{if (CANBOARD) then { [thisList] execVM "killchain\systems\boardingSystems\boardingIndifor.sqf"; };} I should say here, I am execVM-ing things, I will turn these things into functions at some point, but anyway, next we have: killchain\systems\boardingSystems\boardingIndifor.sqf /* this script will be triggered when players land in a specific PZ at base it will: - generate (nearby) reinforcement (RF) assets, and have them board the heli - it will generate only the number needed, no more, no less this script is triggered by an in-mission trigger, with this as the outcome of the trigger: call{if (CANBOARD) then { [thisList] execVM "killchain\systems\boardingSystems\boardingIndifor.sqf"; };} CANBOARD is a global variable to inform whether the boarding / spawning action can take place it is useful in managing multiple pilots wishing to pick up AI */ _passed = _this select 0; // thisList _pilot = _passed select 0; _heli = vehicle _pilot; _freeCargoPositions = _heli emptyPositions "cargo"; [_freeCargoPositions, _heli] execVM "killchain\systems\boardingSystems\boardUnits.sqf"; CANBOARD = false; Then we have a system to spawn the units and board them onto the waiting heli: killchain\systems\boardingSystems\boardUnits.sqf _freeCargoPositions = _this select 0; _heli = _this select 1; _spawn = [8478.22,6580.77]; // specific mission-based spawn point; _float = diag_tickTime; _stampToString = str _float; _stampToString = createGroup [independent, true]; _stampToString setFormation "DIAMOND"; _classes = [ "LOP_PESH_IND_Infantry_SL", "LOP_PESH_IND_Infantry_TL", "LOP_PESH_IND_Infantry_Corpsman", // etc ], _cargo = []; for "_i" from 1 to _freeCargoPositions do { _class = selectRandom _classes; _unit = _stampToString createUnit [_class, _spawn, [], 0.1, "none"]; tinmanModule addCuratorEditableObjects [[_unit], true]; bluforZeus addCuratorEditableObjects [[_unit], true]; _unit assignAsCargo _heli; [_unit] orderGetIn true; _cargo pushBack _unit; sleep 0.3; }; _checkCanRedeploy = true; while {_checkCanRedeploy} do { _heliPos = getPos _heli; _distance = _heliPos distance [8529.09,6579.64,0]; if (_distance > 30) then { _checkCanRedeploy = false; }; sleep 5; }; CANBOARD = true; [_heli, _cargo] execVM "killchain\systems\boardingSystems\checkDeploy.sqf"; And lastly we have a system to track whether the heli should deploy cargo - it checks firstly whether you are in the mission zone (marker), and when yes, checks whether you are on the ground stationary, and when you are it auto-unboards cargo: killchain\systems\boardingSystems\checkDeploy.sqf // this checks for altitude, and if in mission AO, will deploy troops off heli onto ground // automatically when heli has landed _heli = _this select 0; _cargo = _this select 1; _redCheck = true; // used to check if the heli is in the mission AO (i.e. redzone) _altCheck = false; // when confirmed as in AO (dropzone), this is used to track AGL while {_redCheck} do { systemChat "_redCheck - not in redzone"; if (isEngineOn _heli) then { _pos = getPos _heli; _inRed = _pos inArea "redzone"; if (_inRed) then { _redCheck = false; _altCheck = true; systemChat "_redCheck - heli is in redzone - switching to alt-check"; }; } else { // this should shut everything down if the engine is turned off _redCheck = false; }; sleep 10; }; while {_altCheck} do { systemChat "_altCheck running as heli is in redzone"; if (isEngineOn _heli) then { _atl1 = (getPosATL _heli) select 2; _atl1 = round _atl1; if ((_atl1) < 2.5) then { // we need to ensure heli is not only low, but also stationary before unloading _speed = speed _heli; if (_speed < 1) then { systemChat "debug - speed is less than 1"; systemChat format ["_cargo: %1", _cargo]; sleep 1; if (_speed < 1) then { // second speed check is to ensure heli is not bouncing around _markerName = str _heli; systemChat format ["_markerName: %1", _markerName]; _extractLocation = position _heli; _extractMarker = createMarker [_markerName, _extractLocation]; _extractMarker setMarkerShape "ELLIPSE"; _extractMarker setMarkerColor "ColorRed"; _extractMarker setMarkerSize [20, 20]; sleep 1; { unassignVehicle _x; systemChat format ["Unassigning unit: %1", _x]; sleep 1; } forEach _cargo; _units = allUnits inAreaArray _markerName; _units orderGetIn false; _dataStore = []; { if ((side _x) == INDEPENDENT) then { _dataStore pushback _x } } forEach allPlayers; _cnt = count _dataStore; if (_cnt == 1) then { // there is an indifor player in game - move to player pos _commander = _dataStore select 0; _commPos = getPos _commander; { _x setBehaviour "COMBAT"; _x move _commPos; } forEach _units; } else { // no indifor player in game - move AI to obj pos systemChat "confirmed - no indifor player in game"; _movePos = getMarkerPos 'REDZONE'; _units = allUnits inAreaArray _markerName; _cargoCount = count _cargo; systemChat format ["_cargoCount: %1", _cargoCount]; for "_i" from 1 to 4 do { _freeCargoPositions = _heli emptyPositions "cargo"; systemChat format ["Empty positions: %1", _freeCargoPositions]; _cargoCount = count _cargo; if (_freeCargoPositions >= _cargoCount) then { systemChat "heli is empty"; }; sleep 5; }; systemChat "check has finished"; sleep 5; systemChat "move orders ..."; { _x setBehaviour "COMBAT"; _x doMove _movePos; systemChat format ["Unit %1 moving to %2", _x, _movePos]; sleep 1; } forEach _cargo; }; _altCheck = false; deleteMarker _markerName; }; }; }; } else { // this should shut everything down if the engine is turned off _altCheck = false; }; sleep 2; };
  7. reggaeman007jah

    Looking for advice on emptyPositions command

    X) I will check all these things and come back to you. I will also post the poor excuse for SQF I have implemented, in case the answer to the issue lies in there.
  8. reggaeman007jah

    Arma3 Videos

  9. reggaeman007jah

    Arma3 Videos

    Having some fun with the new DLC, with footage taken from the Operation Killchain mission.
  10. Hello everyone, I have been playing around with unitCapture for a while now, and put together a very basic framework that might help people get into it if they have not tried it before, or might save some time for people who already know how to use it. I'm not a great scripter by any stretch, so apologies if there is some bad practice inside (any improvements gratefully received). This video demonstrates the process: The code is here: https://github.com/reggaeman007jah/ucsf init.sqf capture.sqf flight1.sqf The idea is that you basically record your path and simply paste it in between the two comments, and is should just work. This assumes ofc that you have named your helis correctly. It made things a bit easier for me, especially when applying unitPlay to multiple helis at the same time. So, I hope this is of some help to others. Cheers
  11. @code34 once again thank you for this great product. Do you have any plans to enable a file hierarchy? Currently all created files are stored in once place, but what would be quite nice is if you could specify the creation of sub-folders within the root, so you could have folders for Users, Assets, Locations etc..
  12. Hi everyone, I am only just starting to get into making addons, and have just completed my first - a simple dialog that simulates arty by creating explosions based on a 10-digit-grid entry into a dialog. It is basic, but it works in the editor. Now I am trying to pack it up as an addon for private use amongst mates (so not binarised or signed), but I think I am tripping up with the activation of the mod, which I believe is done in the config.cpp file. This is what I have currently: Now I have loaded the mod, and fired up a new session in the editor. The dialog is meant to appear on keyDown (hash key). However this does not happen. However if I go into the debug and enter 'call compile preprocessFileLineNumbers '\easyArty\easyArtyInit.sqf', the mod triggers, and the dialog appears on keydown hash. So I can assume that the mod itself is working ok, and it is an issue with the initialisation (in the .cpp). This is my first mod attempt, so apologies if this is all basic, or if I am missing something very obvious. I have tried for some time to figure this out on my own, but am now calling in help.. Any assistance on this would be very gratefully received! Cheers Alex
  13. reggaeman007jah

    help with config.cpp

    apologies, thank you
  14. reggaeman007jah

    help with config.cpp

    ok, so this is what I have now: I know this is wrong (i.e. this does not trigger anything). Am I getting the CfgFunctions wrong here?
  15. reggaeman007jah

    help with config.cpp

    Thank you both for your help, I will take this on board ...
  16. reggaeman007jah

    help with config.cpp

    yes, CBA is loaded.. But I would happily activate this in a simpler way, without a CBA dependency .. Perhaps the question is, if I were to remove any dependency on CBA, how could I initialise the script that activates the keypress EH (easyArtyInit.sqf)?
  17. Hi, I am messing around with a HUD script for helicopters, and am having trouble getting the angle of the heli as a value. Can anyone point me in the right direction of a command that can tell me the amount that the unit (or the heli the unit is in) is leaning forwards or backwards? thanks in advance
  18. reggaeman007jah

    help with angle of heli

    Thank you ... just what i needed 🙂
  19. reggaeman007jah

    help with a forEach command

    :) haha thank you, sorry :) Much appreciated.
  20. Hello all, I was hoping for some advice on an issue I am having. I am creating some blufor units to send into battle, and can create and move them to the first objective fine. I am also keeping them at said location for a bit while they fight off attackers. When the attack waves have completed, I am also changing the colour of the marker I created to make it easy to see where the action is. My issue is getting the units to move to another location. This is what I used to create the units: I have some conditions running which help to manage mission progression. The condition in question to trigger continuation of the mission is _point1attack = true, and this is applied when all point1 enemies are killed. My assumption was that I needed a forEach command, but this (and variations of this) did not work: If anyone could steer me right on this I would be very grateful.. apologies for missing what is probably a very obvious error here... Thanks RM.
  21. Hello folks, Firstly, I want to thank code34 for this mod. It has opened up so many possibilities for me, and I am so keen to get it working on my server. Also, thank you to gokitty1199, your videos made the impossible possible for me, and I could not have achieved what I have so far without your tutorials. I have learned a lot, so thank you! Next, I want to apologise if the solution to what I am asking is completely obvious. I am by all accounts a very novice scripter, so perhaps the answer to my problem is right in front of my eyes and I just am too blind to see it. I am trying to build a pilot's diary, simply to record the time spent in the heli. Now, using gokitty1199's tuts, and some googling, I have got something that works. Well, most of the time. The problem I am having is with the initial load of the DB info into the script. On first load into the server (and in case it matters, I am testing in the editor, using the MP option), the script does not work. My debug hints that trigger when you get in and out of the heli show that the data is not being passed into the script as it should on first accessing the server (i.e. when the DB is created initially). However, when I respawn and try again, it works completely fine. So, not a critical problem, but it's really doing my head in not understanding why X) Could someone please explain where I am going wrong here? How do I get the flight data loaded correctly on first load of the server? I hope I have explained this properly.. My files: init.sqf initServer.sqf createDatabase.sqf getData.sqf heli.sqf I have tried to resolve this on my own, and for the life of me I cannot get this to work on the first time the DB loads. @gokitty1199 @code34 Any advice gratefully appreciated! PS. I have another blocker with load values, but I wanted to tackle my problems one at a time ;)
  22. reggaeman007jah

    Rotolib VSI Value

    Hi good people, I am trying to build up a personal HUD for heli flying, and I was wondering if anyone can point me in the right direction to obtain the VSI (Vertical Speed Indicator) value. Ideally there is a value I can just take (and display) - I have looked but can't locate this. Or, do I need to calculate the VSI by comparing altitude values vs time? cheers
  23. reggaeman007jah

    Rotolib VSI Value

    Thank you Haz .. :)
×