Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

hansen111

Member
  • Content Count

    37
  • Joined

  • Last visited

  • Medals

Everything posted by hansen111

  1. ********************************* High Command Transport LightWeight AddOn v.1.0.1 ********************************* A VERY simple / lighweight AddOn that fixes current issues with performing transport in High Command Mode - No addons or mods required. ********************************* Author: Henrik Hansen - If you are using my functions in a realease please leave a thank you note in the credits ********************************* Special Thanks To: - Jester814 for inspiring tutorials / videos ********************************* AddOn created mainly to correct high command transport tasks like (but not limited to): - hc group will not board vehicles that has been assigned to other hc groups (even though cargo space is available) - hc group will not board even empty vehicles in which the player has been in the driverseat - Feedback tracker: http://feedback.arma3.com/view.php?id=12934 ********************************* Usage: - Go to high command control (Left CTRL + SPACE) - Use Action (scroll-wheel) Called High Command Transport - Select high command groups (F1 - F12) ********************************* Selecting 2 High Command Groups -> Scroll Wheel High Command Transport -> Load will perform the "Transport Load" action. 1 Transport Load ---------------------- Select the HC Groups (F1 to F12) to combine for transport. In the selected groups, 1 group must be in a vehicle, all other groups must be on foot. If you are in the vehicle to provide transport, only select groups on foot that are to mount the vehicle. If the group transport provider is in a helo, the helo will auto find a location to hover, and the groups on foot will mount. Make sure that the vehicle has capacity to transport the groups. 2 Transport Unload ------------------------- Select 1 or more HC groups that are being transported (assigned as cargo) to dismount the vehicle they are in. If the transport vehicle is a flying helo it will find a location to unload troops while hovering very low, if a helo pad is close it will be used (standard arma). The troops will auto dismount. 3 Crew Enter ---------------- Select 1 HC group to mount and take control (driver and turrets) of a nearby vehicle. Closest vehicle will be considered first and so on, only vehicles that have no CONTROLLING crew is considered, only vehicles that can carry the whole group is considered. If the group have more men than the vehicle driverseat + turrets, the rest will mount as cargo. 4 Crew Exit ---------------- Select 1 or more HC groups that controls (driver + turrets) vehicles, selected groups will dismount their vehicle. 5 Engine On ---------------- Select 1 or more HC groups controlling a vehicle to turn engine on. Its safe to select all HC groups to perform a uniform spool up since the order will be auto ignored by groups not controlling vehicles. 6 Engine Off ---------------- Select 1 or more HC groups controlling a vehicle to turn engine off. If a selected HC group controls a flying helo, that helo will find a location to land and shut engine off. Its safe to select all HC groups to perform a uniform spool down since the order will be auto ignored by groups not controlling vehicles. 7 Helo Land/Hover ----------------------- Select 1 or more HC groups controlling a flying helo that will find a location to hover very low for troops to mount / dismount. Note that troops will not auto mount / dismount, you still need to press 6-1 or 6-2 after the helo is hovering low. 8 Toggle SideChat ------------------------ Toggle if the HC groups will use sidechat to inform you of performed mount / dismount actions, good feature if you are far away, eq. you want to know when a riffle squad have finished dismounting / mounting a helo so you can order the helo back. Known Issues: ********************************* Although it is checked WHEN ORDERED if a group can fit in a vehicle, ordering many groups at the same time into a vehicle that cannot hold all troops can cause unknown behavior, even desynch of groups. To do: ********************************* - Release Single Player ShowCase - Add multiplayer support - http://forums.bistudio.com/showthread.php?180909-High-Command-Transport&p=2778858&viewfull=1#post2778858 Updates: ********************************* v.1.0.1 - 9th of january 2015 ********************************* - Update to handle config changes introduced with "Firing from vehicles" - (Firing Cargo Seats is now turrets) - Transport Load (6-1) now count cargo seats correctly - Transport UnLoad (6-2) now unloading vehicle dont move off to old waypoints - Crew Enter (6-3) now count cargo seats correctly - Replaced KK_fnc_commonTurrets with allTurrets - Replaced "deleteWaypoint [_x, all]" with "while {(count (waypoints _x)) > 0} do {deleteWaypoint ((waypoints _x) select 0)};" - (RPT ERROR LOG) - Added Variable: HC_Transport_Version Here is a nice video made by Jester814 on high command, it also illustrates the need for a fix like this addon: DropBox Download: https://www.dropbox.com/s/9dbdfyta8sxbhm3/%40HC_Transport.zip?dl=1
  2. Hello all So im writing a function (grid system) to avoid overhead on a algorithm that checks if players are in certain areas, the question is: Do the standard triggers/modules support this already or do they just iterate through all players with something like _unit distance _center on a defined interval? If its the ladder then using the already supported mapGridPosition function would greatly reduce overhead: //INIT GRID FOR MONITORING _gridCenter = [_gridX,_gridY]; _gridID = "mygrid_" + _gridNum + (mapGridPosition _gridCenter); missionNameSpace setVariable [_gridID, true]; //CHECKING IF PLAYER IS IN GRID _gridID = "mygrid_" + _gridNum + (mapGridPosition player); Method 1: if(isNil _gridID) then {hint "player IS NOT in grid"}; Method 2: if(missionNameSpace getVariable [_gridID, false]) then {hint "player IS in grid"}; So the question becomes: what is the speed comparison between _unit distance _center <= _radius and isNil ("mygrid_" + mapGridPosition player) ? I guess i will run some simulations on this. Thoughts? Thanks in advance.
  3. hansen111

    Position Algorithm ArmA3

    Yup, when im actually coding the system im going to have a routine putting players in arrays so its easy to use, it would be something like this (Not tested but you get the idea). //INIT _zoneNumbers = [0,1,2,3,4,5,6]; _gridZonePlayers = []; {_gridZonePlayers pushBack []} forEach _zoneNumbers; //ROUTINE { _player = _x; _mapgrid = mapGridPosition _player; { _zonenumber = _x; if(!isNil ("mygrid_" + str _zonenumber + _mapgrid)) exitWith { _playersInZone = _gridZonePlayers select _zonenumber; _playersInZone pushBack _player; }; } forEach _zoneNumbers; } forEach Allplayers; //To get the array of players in the zone 1; _zoneOnePlayers = _gridZonePlayers select 1; Edit: And btw if someone is wondering about grid sizes, radius ect then this system is based of the standard arma grid that the mapGridPosition function returns, a grid is 100m X 100m, every position in that grid translates to the same unique grid id which the mapGridPosition function returns when inputting the position. This system does NO distance checks but uses only mapGridPosition hence its much faster. If you need a circle distance check then you need to do normal distance checks but only for the few players inside the corresponding grid and not all players, again optimizing the method compared to only triggers.
  4. hansen111

    Position Algorithm ArmA3

    It was mostly pseudo code to prove the system, I have now edited it so it would actually run, but you have to understand the system here instead of typos. The facts remain, the grid system on 7 zone case on 30 soldiers is 275 times faster (minus 1 call to the mapGridPosition function which I cant find a ms time on). Again the whole difference is that you dont have to do 7 distance checks but 7 isNil checks (+ 1 mapGridPosition call) Edit: And oh btw, yes im using grids. If you want to know if someone is in the circle area you have to run distance checks on those that is in the main grid, its still very few distance checks compared to running only triggers.
  5. hansen111

    Position Algorithm ArmA3

    Ok, so I will illustrate this better, here is the situation for a case: https://steamcommunity.com/sharedfiles/filedetails/?id=2301831648 We have 7 zones, we want to check 1 time a second what players are in these zones. Now I know of all the modules and functions in the wiki ect. that does this but we can do a lot better performance wise, or at least i think so :-) by using the grid system, I will explain why: So the normal routine to check if someone (or something) is in a certain area is by doing a function, module, trigger that uses distance checks in a certain time period in a certain area, like 1 time a second for this example, we have to do this for each zone, so 7 triggers if we use those. BIS have made a great article explaining the performance of different functions here: https://community.bistudio.com/wiki/Code_Optimisation In there we can see: // with a 30 items array _someoneIsNear = (allUnits findIf { _x distance [0,0,0] < 1000 }) != -1; // 0.0275 ms _someoneIsNear = { _x distance [0,0,0] < 1000 } count allUnits > 0; // 0.0645 ms _someoneIsNear = { if (_x distance [0,0,0] < 1000) exitWith { true }; false } forEach allUnits; // 0.0390 ms that it would take 0.0275 ms to do 30 distance checks (30 soldiers). This is for 1 zone, we have 7, so it would be for each check: 0.0275 * 7 = 0,1925 ms In the grid system we would not need to do 7 distance checks, we need to do 7 isNil checks og 1 call to the mapGridPosition function, but only 1: _mapgrid = mapGridPosition player; { if(isNil ("mygrid_" + _x + _mapgrid)) then {hint "not in zone"}; } forEach _zones; Remember we ran a short init code before the mission begins that sets the zone variables, this is done only 1 time in init: //INIT GRID FOR MONITORING _gridCenter = [_gridX,_gridY]; _gridID = "mygrid_" + _gridnum + (mapGridPosition _gridCenter); missionNameSpace setVariable [_gridID, true]; On the BIS optimisation link above you can read the time 1 isNil check takes: isNil "varName"; // 0.0007 ms So we have reduced a 7 time distance check (0.0275 * 7 = 0,1925 ms) to a 7 time isNil check (0.0007 ms * 7 = 0,0049 ms). The grid system is 275 times faster! - from that we have to deduct the time that 1 call to the mapGridPosition takes so its a bit slower but still a fantastic optimisation!
  6. hansen111

    Position Algorithm ArmA3

    Sure or some other stock function module we already have in the wiki, the important thing is if the grid system can greatly outperform those stock functions/modules. I did some testing and so far it seems the standard distance function is highly optimized, on 7 million iterations on my system there is only 4.5 seconds gained by using: isNil "somevar" instead of using player distance _pos <= _radius !? That is super surprising to me. Why would checking if a varibale isNil take almost as long as a full distance check!? I will test further..
  7. hansen111

    Advanced AI Command

    Love the mod, very well done
  8. Operation Takistani Freedom Episode 1 - The Lalazar Oil Fields https://youtu.be/taqVFxMCrys Its been 10 years since a coalition, led by USA, defeated the Takistani army in Operation Desert Wind. A puppet government was put in place but Takistan was plagued by civil war in the following years. The civil unrest created the perfect conditions for the growth of the terrorist group called ISID. The group won some important battles against the Takistani government and seized control of oil fields which they use to finance their army. The ISID have claimed responsibility for terrorist attacks all over the world and this year the US Army have been sent back to help the Takistani army defeat ISID. In part 1 you will take the role of an A-10 pilot on a mission to soften up some hard ISID targets around the Lalazar oil Fields in preparation for a Takistani assault aimed at taking back the oil field. Events soon spiral out of control and the hunter becomes the hunted. Required Mods (All on steam - subscribe with 1 click): - CBA_A3 - CUP Terrains - Core - CUP Terrains - Maps - CUP Units - CUP Weapons - CUP Vehicles Hit the thumps up button on steam workshop if you like to see more missions in the OTF Campaign. Steam Link: http://steamcommunity.com/sharedfiles/filedetails/?id=799495845 DropBox: https://www.dropbox.com/s/34cmreeu1kpxg07/OTF%2520Part%25201%2520-%2520The%2520Lalazar%2520Oil%2520Fields.takistan.pbo?dl=1
  9. hansen111

    High Command Transport

    You can always issue the Crew Exit (4) command :)
  10. hansen111

    High Command Transport

    DropBox Link Updated today: - Moved High Command Transport Interface Activation To An Action (scroll-wheel) - Action For Activating Interface Is Only Available When Player Is In High Command Mode (LEFT CONTROL + SPACE)
  11. hansen111

    High Command Transport

    Sure, just leave a thanks note in your credits
  12. Confirmed, really frustrating when vanilla things that should always work brakes like this. Hellcat gunship is useless atm.
  13. Hi all My RPT log is getting spamed with these (Single Player): Destroy waypoint not linked to a target: Near target acquisition is slow and may even select friendly unit. Searched but did not find a clear answer, anyone know what is causing this? Thanks,
  14. hansen111

    MP Game Mode Support Feedback

    Best mission seen so far on helo support missions, but Why oh why did you exclude the possibility of having a few AI pilot slots, just 1 slot for ai for taking out a few enemy vehicles would make a lot of difference. Most importantly, is it true i cant find the mission file anywhere? is this encrypted epo files? Please BI do not continue down this road, there is no Huron or any buyable dlc content that needs protection here, you effectly Lock out the possibilities of mission builders learning and making great edits the community wants, this behavior goes against everything i love about arma!
  15. Correct, I have now found the REAL cause of the problem, in my case its actually a BI error in High Command Module. Your RPT error log will be spammed with the above error when setting a Destroy waypoint on enemy hc icon for one of yor hc groups when in High Command Mode (L CTRL + SPACE). That is giving a destroy waypoint for one of your hc groups, the spamming of the RPT log with these errors was so intense that my gaming rig dropped a lot of fps. At least I know what is causing it now.
  16. It looks like setting the waypoint completion radius too small was the problem, REMOVING the following line in script seemed to have resolved this issue: _wp setWaypointCompletionRadius 0.5; Will report back here if issues continue for future readers having this problem. EDIT: I later found out this had nothing to do with the problem...read on...
  17. So i decided to release my Zues object editor script to save objects mappings made in zues, the script also loads object mappings in missions without Zeus being enabled. The objects mappings are precise as the script uses VectorDir and VectorUp ect. ********************************* Zues ObjectEditor V.1.0 ********************************* Author: Henrik Hansen - If you are using my functions in a realease please leave a thank you note in the credits ********************************* Script Created To Have Easy Save Functions For Obects In Zues - And Being Able To Easily Create Those Saved Objects In Missions Without Zues ********************************* Install (example mission included): - Extract rar file to your mission folder eg: missions\zues-objecteditor.Altis\ ********************************* Usage (example mission included): SAVING OBJECTS: - Start the example mission and Press Zues key (default Y) - Create/Edit your objects in Zues - Save your objects to clipBoard by pressing radio alpha (0-0-1) - Open notepad and paste content - Save notepad file to missionfolder eg. "missions\zues-objecteditor.Altis\zeus_objecteditor\grabbedobjects\myobjects.sqf" - Restart mission and your objects will be loaded into zues on mission start ********************************* LOADING OBJECTS IN MISSIONS (With Or Without Zues) - in init.sqf insert lines in EXACT this order (ZOE_ObjectSaves must come before include line): - copy the "zeus_objecteditor" folder (including your objects) to your mission folder, so you have: missions\myMission.Altis\zeus_objecteditor\grabbedobjects\myobjects.sqf DONE! You objects will be loaded on mission start ********************************* USING MULTIPLE OBJECTSAVE FILES - in init.sqf put in the filenames eg. ZOE_ObjectSaves = ["myobjects.sqf","myobjects2.sqf"]; - all objects from both files will be created ********************************* DYNAMIC OBJECT CREATION / DELETION - If you know a little bit of scripting you can dynamicly load/delete objects during missions and not on mission start: - in init.sqf insert lines in EXACT this order (ZOE_Variables must come before include line): - To create objects on the fly do: "myobjects.sqf" call ZOE_Mission_CreateObjects; - To delete objects on the fly do: "myobjects.sqf" call ZOE_Mission_DeleteObjects; - All objects are preloaded on mission init so no extra load overhead is involved by calling these functions Enjoy Download DropBox: https://www.dropbox.com/s/te6n1h4b0blbhdq/zues-objecteditor.Altis.rar?dl=0
  18. hansen111

    Zues ObjectEditor [script]

    Hi gienkov, thank you very much for the feedback, i updated the description with your info. Zues ObjectEditor was created for the main purpose of mapping objects (not vehicles though possible) in zues, save the mappings, recreate them and load them into zues so you can continue to edit. Secondly the script can create the mappings in missions, i did not test multiplayer so very good with feedback, thanks again.
  19. hansen111

    High Command Transport

    Thanks man, im currently working on a HC_Transport showcase that will hopefully show how cool HC warfare can be.
  20. hansen111

    High Command Transport

    Yes lol, it should be like that with every game feature :-) Thanks for the mirror, was just about to PM You but you are way too fast :-)
  21. hansen111

    High Command Transport

    Updates: ********************************* v.1.01 - Update to handle config changes introduced with "Firing from vehicles" - (Firing Cargo Seats is now turrets) - Transport Load (6-1) now count cargo seats correctly - Transport UnLoad (6-2) now unloading vehicle dont move off to old waypoints - Crew Enter (6-3) now count cargo seats correctly - Replaced KK_fnc_commonTurrets with allTurrets - Replaced "deleteWaypoint [_x, all]" with "while {(count (waypoints _x)) > 0} do {deleteWaypoint ((waypoints _x) select 0)};" - (RPT ERROR LOG) - Added HC_Transport_Version
  22. Indeed, WHY ???? Thanks for the link
  23. So someome asked me how to detect if a position is in a rectangle area without having to use a marker, i searched to give him a link but could not find a small working function, so i wrote and tested one. I thought i share it for anyone in the future searching for the same function: The functions needs (Parameters): 1) A position, either getPos or getPosATL ect. IMPORTANT - Use the same method (getPos, getPosATL ect.) to get positions of the area and to get postion of player ect _myPos = getPos player; 2) An array containing 4 positions that makes the box I used 4 flag objects to test the box: _myBox = [getPos flag1,getPos flag2,getPos flag3,getPos flag4]; The function returns boolean (true/false) if the position is in the box So: _isPlayerInArea = [getPos player,_myBox] call isPosIn2DArea; isPosIn2DArea = { //Author: Henrik Hansen private ["_maxx","_maxy","_minx","_miny","_pos","_box"]; _pos = _this select 0;_box = _this select 1; _maxx = (_box select 0) select 0;_minx = _maxx; _maxy = (_box select 0) select 1;_miny = _maxy; { if ((_x select 0) < _minx) then {_minx=(_x select 0)}; if ((_x select 0) > _maxx) then {_maxx=(_x select 0)}; if ((_x select 1) < _miny) then {_miny=(_x select 1)}; if ((_x select 1) > _maxy) then {_maxy=(_x select 1)}; } forEach _box; ( ((_pos select 0) <= _maxx) && ((_pos select 0) >= _minx) && ((_pos select 1) <= _maxy) && ((_pos select 1) >= _miny) ) };//function Here is the test code i used, it will make a hint every second saying on screen if you are in or outside the box: [] spawn { private ["_myBox"]; _myBox = [getPos flag1,getPos flag2,getPos flag3,getPos flag4]; while {true} do { if ([getPos player,_myBox] call isPosIn2DArea) then {hint "In Box"} else {hint "Outside Box"}; sleep 1; };//while };//spawn enjoy
  24. hansen111

    isPosIn2DArea [function]

    Correct, that was what i was getting at. Thanks zapat, could you include a few examples, that would be great for future readers of the post. Love your Work on getTactical and blackrain btw.
  25. hansen111

    isPosIn2DArea [function]

    Hmm i dont see that, inTrigger is way way worse because it leads you to think it revolves around arma triggers. 2 out of 4 in this thread thinks inTrigger is terrible, only you have a problem with my function name, so thats fine.
×