Jump to content

fn_Quiksilver

Member
  • Content Count

    2697
  • Joined

  • Last visited

  • Medals

Everything posted by fn_Quiksilver

  1. SOLDIER TRACKER by QUIKSILVER v2.6.0 CREATED: 8/08/2014 UPDATED: 11/10/2023 A3 2.14 Download (GitHub) VIDEO: IMAGES: DESCRIPTION: A system for showing Soldier, Vehicle and Group information on the Map, GPS and HUD. PURPOSE: Designed for scenario designers to have a powerful, high-performance and highly flexible solution to presenting player, vehicle and group information on the map, GPS and HUD interfaces. FEATURES: FUTURE DEVELOPMENT: INSTRUCTIONS: PERMISSIONS: SUGGESTIONS / FEEBACK / BUG REPORTS: KNOWN ISSUES: CHANGE LOG: THIRD PARTY CREDIT: DONATE: DOWNLOAD LINK: Download (GitHub) Cheers! 🙂
  2. fn_Quiksilver

    Apex Framework

    Arma 3 Apex Framework Version - 1.5.6 (14/11/2023) Compatibility - Arma 3 2.14 Download (Github) Support (Discord) Email - armacombatgroup <at> gmail Documentation (Github) Donate (Patreon) Enjoy ______________________________________________ Terrains: Vanilla Altis Tanoa Malden 2035 Livonia Stratis (classic & zeus modes only) DLC * Further DLC integration & support is coming Sefrou-Ramal (Zeus mode only) - Western Sahara DLC Cam Lao Nam (Zeus mode only) - Prairie Fire DLC Khe Sanh (Zeus mode only) - Prairie Fire DLC The Bra (Zeus mode only) - Prairie Fire DLC Weferlingen (Zeus mode only) - Global Mobilization DLC Gabreta (Zeus mode only) - CSLA Iron Curtain DLC * Further DLC integration & support is coming Mission Types: Zeus. Disable the objectives and use the integrated systems (including advanced Zeus systems) to support your own custom content. Invade & Annex: Apex Edition. Classic I&A style mode. Sector Control. Domination-style Sector Control mode. Campaign. Insurgency-style campaign mode. Gameplay: Edited Raw Installation Guide: Features: Base Building. We have implemented an early prototype of base-building, with built in base-defense missions. Advanced AI behaviors: suppressive fire, building clearance, logistics & helicopter use, dynamic close air support & mortar support, regrouping, automated medics, vehicle repair, demolitions, house/building suppressive fire, stance adjustment, inter-squad communications, evasive behavior, attack & defend routines, tactical commander, organic intel gathering to decide where to commit soldiers & resources. tracer rounds to make battlefield more visceral, custom jungle spawning & patrol routines built for Tanoa. Custom Logistics. Deployable fortifications and player-deployable game mechanics. Towing. Wrecks. Game mechanic to recover wrecks after catastrophic vehicle damage. Headless Client. Plug & play 4+ headless clients with automated load balancing. Ambient civilians and wildlife. Custom wildlife and civilians at missions, using high-performance techniques to ensure they don't reduce FPS. Geo-typical dynamic weather. Weather for Altis/Stratis/Malden taken from Lemnos data, Tanoa weather taken from Fiji data. Persistent and full yearly cycle. Storm simulation & fog reduction. Dynamic day/night cycle. Accelerated nights, accelerated noon, slowed down at dawn & dusk. Cinematic AO lighting on dark nights. Persistent and full yearly cycle. Dynamic missions. Players can create tasks and objectives for each other. Recruitable AI. Players can recruit AI to help with the fight, either as engineers, fire support, fully integrated automated medics, etc.. Wide range of enemy weapons. Enemies use a wider array of weapons that those defined in config. 70+ custom player interactions. Intuitive and custom player interactions using the action menu (familiar to veterans and newbies alike). Role Selection Menu System. Change role or faction without aborting to the lobby. Custom menu system. Menu system supporting custom buttons, player options and link buttons to your community website. Full difficulty scaling by player population. Dynamic AI difficulty. Interactive side missions. Custom Zeus systems. Keybindings (numpad) to support on-the-fly Zeus missions, including garrison, patrol, attack, suppressive fire, player revive, unit incapacitation, and hunting/stalking logic. Custom Virtual Arsenal. Use either the custom whitelist or blacklist to set up what gear your players have access to. Inventory Saving. Save & Load & Edit the inventory of crates and vehicles easily. Custom medical system. An intuitive and simple medical system for public server play, not buggy! Revive, stabilise, medevac, carry, drag, load, unload, ambulances, field hospitals, AI revive. Custom MOUT operations. urban warfare AOs for Tanoa & Altis. Player damage modeling. Dynamic damage modeling to make playing against AI more fun. Admin tools. Admin tool menu with a range of options for moderators, admins and developers, including a custom dev terminal. Anti-cheat. A proven anticheat custom-fitted into the mission, caught about 30 cheaters on the development server over 16 months. Anti-troll. A system to resist and counter common forms of griefing. Restart schedule. A custom restart schedule built into the mission to provide graceful restarts, reminding players which server they are on and time-until-restart. Helmet-cam live feed. Players at base can watch a live feed of operations. Enemy capture. Capture enemies and imprison them. Blue Force Tracker. High detail blue force tracker system with dozens of configurations, including custom enemy info on the map display. Earplugs. Weapon lasers. Squad Radar. Suppression Effects. Hit Marker audio cue. Feedback when your bullet hits an enemy. Illumination Flares. Flares fired from weapons and mortars provide good illumination. Visibility & View Distance menu. Magazine repack. Backpack locking. Parachute deployment. Explosives charge 'attach to surface'. Gameplay Leaderboards. Track transport pilot effectiveness, top medics, weapon accuracy, sniper accuracy, and other objective-based metrics. Semi-persistent (weekly ladder). Dynamic Simulation. Server-side dynamic simulation and client-side optional dynamic simulation to improve FPS and performance. Logistics, Towing, Hauling & Mounting, Carrying & Dragging. Custom system to facilitate towing, and mounting of static weapons to suitable vehicles. Also linked directly to ingame Vehicle-in-Vehicle system for seamless logistics. Enhanced Slingload rope controls. Adjust rope length during flight and seamlessly attach Taru pods to Taru helicopters with simple controls. Active Protection System for armored vehicles. Based on Israeli "Trophy" and Russian "Afghanit" systems. Forward Operating Bases. Forward operating bases built directly into the framework, with logistics tasks, respawn tickets, vehicle respawns, ... Aircraft Carrier (USS Freedom). Dynamic aircraft carrier can be toggled on and off with a mission parameter, spawns at random locations, fully supported with vehicle respawns, player respawns, optional defensive turrets, and field hospital mechanics. Destroyer (USS Liberty). Dynamic destroyer can be toggled on and off with a mission parameter, spawns at random locations, fully supported with vehicle respawns, player respawns, optional defensive turrets, optional naval artillery, and field hospital mechanics. 40+ Custom object compositions. Many missions spawn custom scenes to add a fresh and replayable element to the missions. Custom vehicle & uniform skins. A variety of custom and realistic military skins created for this framework. Monetization solutions. Servers cost money, so we have put in solutions to reward players for donating. Custom cosmetics system for patches, uniforms and vehicle skins, and whitelisted lobby roles. Monetization license. You may use this framework on monetized servers. Highly polished. Considerable time spent polishing and ironing out bugs and rough edges, a necessary part of professional development missing from many other mission offers. Performance. Surprisingly high FPS (both client & server) for the amount of action going on, smooth and doesn't stutter. Change Log: https://github.com/auQuiksilver/Apex-Framework/blob/master/Apex_framework.terrain/documentation/_Change Log.txt Mods supported: Blastcore Edited (standalone) by Opticalsnare JSRS soundmod by LordJarhead Mods integrated: Advanced Rappelling by duda Mag Repack Custom skins (third party designers): A sample of the vehicle & uniform skins that come as a separate content pack for use with the framework, purchased from third-party designers. Notes: Do not use AI mods like VCOM and ASR. There is an AI system built directly into the framework. Youtube development channel: https://www.youtube.com/user/QuiksiIver/videos License: Monetization permitted APL-SA (you have permission to modify and publish the modified version for others to download/use).
  3. fn_Quiksilver

    Apex Framework

    Updated to 1.5.6 Stability & bug fixes * 1.5.6 is now current Stable Build [ADDED] Interaction to 'Pack Up' vehicles and wrecks into logistics cargo containers. [ADDED] Interaction to set stance of guard AI (base building) [ADDED] Parameter to adjust how often server prints general info reports to RPT log. [TWEAKED] Various ongoing general scripting optimisations (A3 2.14) [TWEAKED] GPS alternate mode ( Ctrl + ] ) now properly rotates player icon. [TWEAKED] Better handling of vehicles submerged in water (drowned). [TWEAKED] Bobcat mine clearance would spam notification messages. [TWEAKED] Zeus can now repair vehicles and heal units, with same "revive selected unit" key binding (Numpad 7). [TWEAKED] Zeus numpad key bindings also now have alternate corresponding Custom key binding options. [TWEAKED] Zeus garrison function to work for ammo boxes and small objects to be placed into buildings. [TWEAKED] Zeus Placing soldiers near Destroyer ship will now garrison them onto the ship. [TWEAKED] Zeus Placing objects near destroyer will place them onto destroyer helipad (be careful, collision enabled!) [TWEAKED] Zeus Placing objects under carrier will place them on ship deck directly above (if the carrier is directly above). [TWEAKED] Zeus Placing crewed aircraft on water will put them into flight automatically. [TWEAKED] Zeus Placing crewed aircraft while holding [Alt] will spawn them in flight. [TWEAKED] Zeus will no longer hear strong gusty wind noise when zeus camera is at high altitude. [TWEAKED] Zeus view distance will adjust dynamically when entering/exiting interface (syncs to "Plane" visibility setting). [TWEAKED] Passenger in UGV Stomper can now drive the vehicle without a UAV Terminal. [TWEAKED] Main Battle Tank cannon recoil dampening now only works when stationary. [TWEAKED] Reduced mass of small cargo containers to allow HEMTT flatbed to carry two at once. [TWEAKED] Recruitable AI placed in editor can be spawned on elevated surfaces. [TWEAKED] Added AI garrison positions to cargo plaftorms. [TWEAKED] Unarmed UGV Stomper given Forklift abilities. [TWEAKED] Player can now use the "Eject" key binding when incapacitated in a vehicle. [TWEAKED] Vehicle passive stealth algorithm for missile passive countermeasures. [TWEAKED] Improved player survivability in armored vehicles. [TWEAKED] Turning off vehicle engine clears any active cruise control. [TWEAKED] Cargo could not be unloaded from wrecks. [TWEAKED] Damage disabled on many fortifications. [TWEAKED] Added build delay to sandbags setup. [TWEAKED] Packing up and unpacking vehicles requires Repair services nearby. [TWEAKED] The "Engine Toggle" key binding will now force AI driver to turn off vehicle engine (if player is commander). [TWEAKED] Boats can now be unflipped. [TWEAKED] Inflatable boats given "Forklift" ability to act as a ferry (for logistics containers, etc). [TWEAKED] Required enemy distance for packing/unpacking deployments. [FIXED] Player in seat of vehicle could fire when inside no-fire area. [FIXED] Z-axis issue with spawning units in buildings (units spawning way above building and falling down). [FIXED] Script error with group commands (Ctrl + numpad gestures). [FIXED] Winch system could get stuck in an unbreakable script loop. [FIXED] Using Arsenal Mode 3 in parameters would cause player to get stuck accessing Arsenal after changing roles. [FIXED] T100X Futura tank now fires properly [FIXED] Server would get stuck in a reboot loop if only one daily restart was set in parameters. [FIXED] Script Errors event was not saving unique script errors properly. [FIXED] Case sensitivity bug with enemy reinforcing in urban areas. Enemies should respawn in urban areas more reliably. [FIXED] New logistics containers were not having their mass set correctly over MP network. [FIXED] Tank commander (with AI driver) was unable to manage Cruise Control and Convoy Separation. [FIXED] Winch could hook onto unwanted objects (player weapons, etc) and then remain suspended in midair. [FIXED] Bug in Vehicle Cargo where unload menu could display non-unloadable items. [FIXED] "Forklift" function was non-functional on packed vehicles and wrecks. [FIXED] Malden default base respawn marker. [FIXED] Opening vehicle parachute could cause cause upward velocity in some cases. [FIXED] AI bug with dynamic stance adjustment (case sensitivity). [REMOVED] Changes to the Unflip interaction and Unflip parameter.
  4. fn_Quiksilver

    Apex Framework

  5. fn_Quiksilver

    Is single player being phased out of Arma?

    Single player in general has been getting phased out for a decade. It's more expensive to buiild and maintain, much easier to create environment for unpaid labor (modders) to work on "emergent player generated content" for you
  6. https://community.bistudio.com/wiki/getSlotItemName There are hardcoded slot numbers 603 - Goggles 605 - Headgear 608 - Map 609 - Compass 610 - Watch 611 - Radio 612 - GPS 616 - HMD 617 - Binoculars 701 - Vest 801 - Uniform 901 - Backpack So if you are trying to determine if the player has a radio (vanilla or modded), you just do (player getSlotItemName 611) isNotEqualTo "" // the player has a radio of some sort since it will return "" if there is nothing in the radio slot
  7. fn_Quiksilver

    Soldier Tracker ( Map and GPS Icons )

    Updated to 2.6.0 Small update - GPS icons now display correctly when GPS is used in rotation mode ( ctrl + ] ) - Mod compatibility, no longer relies on vanilla GPS item (will detect whatever is in that inventory slot instead). - UAV/remote-controlled-unit detection. Correctly shows player name who is actively remote controlling a unit/drone, even without UAV terminal.
  8. Alternative to "ItemRadio" in (assignedItems player) is (player getSlotItemName 611) isNotEqualTo "" which is mod-friendly for non-vanilla radio items
  9. fn_Quiksilver

    Apex Framework

    theoretically easy, but ive never created anything multi faction. there isnt much demand for TvT beyond king of the hill. you can run "playable opfor" already however, so technically it does support multi faction
  10. there are no seasons in arma (spring, autumn, etc) green trees are green trees. the most you'll get is the sun position and sunrise/sunset time, and that the thermal imaging contrast changes with ambient temperature (winter is high contrast white/black while summer is lower contrast grey scale)
  11. fn_Quiksilver

    Land transportation

    I would suggest not to bother. the AI driving is generally incapable of complex and mission-critical movements in multiplayer. it is a nice idea, and if you want to try it go for it, but many have come before you trying to do similar
  12. fn_Quiksilver

    Apex Framework

    Updated to 1.5.5 Stability & bug fixes [DISABLED] Naval Artillery Mk45 Hammer for new Fire Support until it is fixed in future version. [TWEAKED] BIS Dynamic Groups initialization. [FIXED] Unload Cargo menu script would keep running after closing, creating a memory leak. [FIXED] Player was unable to mount static weapons onto suitable vehicles. [FIXED] Script error in UAV self destruct. [FIXED] Script error in AI medical handling. [FIXED] MG Tower could spawn floating. [FIXED] Script error in client core procedure.
  13. fn_Quiksilver

    Apex Framework

    Updated to 1.5.4 Stability & bug fixes [FIXED] Player would die instead of becoming incapacitated. [FIXED] Player unable to mount cage armour to tanks/apcs. [FIXED] Player unable to load captives into vehicles. [FIXED] Script error with AFK system. [FIXED] Script error with Unload Cargo menu [FIXED] Script error with UAV self-destruct handling. [FIXED] Script error with enemy AI Direct Fire Support ability. [FIXED] Vehicle init code could execute before mission ready. [FIXED] Earplugs would not work properly if players volumes were set oddly.
  14. fn_Quiksilver

    Apex Framework

    Updated to 1.5.3 Stability & bug fixes [ADDED] Fire Support request system (spacebar with binoculars). [ADDED] Parameter to 'overclock' deployment attacks. Use at own risk! [ADDED] Parameter for AI-controlled base artillery. [ADDED] Defensive AI to Fortification containers (FOB/combat outpost/patrol base). [ADDED] Recruitable AI to Mobile Respawn container. [ADDED] Parameter to disable splash menu. [TWEAKED] Virtual cargo capacity. [TWEAKED] Player needs to look at service vehicle to start service, when being serviced by a service asset (rather than a marker pad). [TWEAKED] Players are now able to effectively use Arsenal on recruited AI. [TWEAKED] UAV Operator no longer able to control Naval Artillery (replaced by fire support system). [TWEAKED] Virtual object builder can disassemble it when no other players are nearby. [FIXED] Deployable safezones (low security) were not working properly, rendering player invincible. [FIXED] Unable to toggle on/off safe zones. [FIXED] Player was unable to carry static weapons. [FIXED] UI issue with 3D player tags. [FIXED] Armed aircraft were becoming wrecks too often. [FIXED] Player was able to remotely delete vehicle cargo. [FIXED] Radio tower could spawn above ground. [KNOWN ISSUE] Naval Artillery Mk45 Hammer may not respond to fire missions (its kinda mid).
  15. this is an old method ... use "addForce" instead if (local bob) then { [] spawn { bob addForce [bob vectorModelToWorld [0,-200,0], bob selectionPosition "rightfoot"]; sleep 5; bob setUnconscious false; }; };
  16. also newer https://community.bistudio.com/wiki/allowService this allowService 0;
  17. fn_Quiksilver

    Apex Framework

    Updated to 1.5.1 Stability & bug fixes * Due to the massive number of code changes, 1.5.x is still in beta. Expect bugs, fixes, etc. [ADDED] Ability for Zeus to raise/lower placed buildings/structures/fortifications with [-] and [+] keys (on selected structures). [TWEAKED] Improved vehicle cargo capacity handling (Work in progress) [TWEAKED] Improved detection of low-light conditions/nighttime [TWEAKED] reduced sniper chance at low pop (classic mode) [FIXED] *Critical* Classic Mode AO does not properly cycle, enemies at prior AO not cleaned up [FIXED] Vehicle cargo loading was uncontrolled (anything could be loaded into anything). [FIXED] Admins were not able to lock their own group [FIXED] Non-pilots could fly jets even when role was restricted to pilot-only in parameters. [FIXED] Deployable virtual cargo was available even after deployable packed up. [FIXED] Fixed bug in enemy jet pylon handling. May have been causing cascade failure in AI system and preventing AI cleanup after AO. [FIXED] Spawn vehicle-protection zone was not functioning. * In addition to bug fixes, we will be working on language translation and documentation in the coming days.
  18. fn_Quiksilver

    Apex Framework

    Just a note, if you are working with latest build, there are and will be bugs. Keep on top of ongoing fixes by keeping up to date with recent commits: https://github.com/auQuiksilver/Apex-Framework/commits/master
  19. fn_Quiksilver

    Apex Framework

    ^ showcases a few of the new logistics systems
  20. fn_Quiksilver

    New system for Arma3

    Integrated graphics and Nvidia GeForce Now works great too. just $20/mo or whatever, no need for a rig.
  21. fn_Quiksilver

    Apex Framework

    Updated to 1.5.0 Logistics, base building mechanics & new player interactions * Due to the massive number of code changes, 1.5.0 is in beta. Expect bugs, fixes, etc. [ADDED] Extended Context action menu (Windows key). [ADDED] Towing [ADDED] Pylon Loadout Editor [ADDED] Quick Build System (Sandbags, etc) [ADDED] Deployable bases, vehicles, logistics & weapons systems. [ADDED] Wreck Recovery. [ADDED] Weapon lasers (beta). [ADDED] Bobcat/Tractor/Quadbike configured with forklift capabilities. [ADDED] Emergency Parachute for flying/falling vehicles. [ADDED] Mortar Gunner role can assemble a "Lite" disposable Mortar with 1 backpack. [ADDED] Increased glide distance when parajumping. [ADDED] Aircraft can now roll backward when on ground or carrier deck (use "moveback" key, usually ) [ADDED] Alternate UI mode for progress visualization system. [ADDED] Altitude controls for UAVs (page up/down) including landing mode. [ADDED] Stealth Mode for MH-9 Hummingbird (passive countermeasure mode). [ADDED] Vehicle Locking (driver seat and inventory). [ADDED] Extra weather parameters. [ADDED] Laser color customization menu. [ADDED] Face customization menu. [TWEAKED] Jets have extra gun ammo and extra flares. [TWEAKED] Overhauled safezone system. [TWEAKED] New vehicle service now rearms large magazines much faster. [TWEAKED] Players can eject from steerable parachutes with their Eject key binding. [TWEAKED] Base Artillery no longer locks/ejects the Gunner after shells depleted. [TWEAKED] Static Weapons can now be carried and Loaded into vehicles, similar to ammo crates. [TWEAKED] Static Titan Launchers (AT/AA) have increased ammo. [TWEAKED] Vehicles with camo-net on have a chance to passively defeat missile lock. [TWEAKED] Stealth aircraft have a chance to passively defeat missile lock. [TWEAKED] Vehicles with slat armor on have improved survivability. [TWEAKED] Car siren turns off when vehicle owner exits vehicle. [TWEAKED] Old Towing system (now only handles Mounting). [TWEAKED] Prowler LSV can now fire both AT and AA Titan missiles, and their default magazine capacity has been increased. [TWEAKED] UGV Stomper now gets "packed for transport" when being slingloaded or transported in cargo to mitigate game desync issues. [TWEAKED] Pilot can disable passengers opening/closing Ramp with [Tab] key (Same as fastrope toggle). [TWEAKED] Force AI to dismount/mount vehicle (Custom User Action 15). [TWEAKED] Vehicle collisions now more survivable (Car/Tank/Boat). [TWEAKED] Cargo load/unload interaction for increased flexibility. [TWEAKED] Earplugs system. [TWEAKED] How game detects nighttime (for scripted lighting). [TWEAKED] Player can adjust adaptive distance for convoy cruise control driving and AI convoy separation. [TWEAKED] UAV/UGV headlights and collision lights can now be turned on/off manually by operator. [TWEAKED] Player 3D cursor tags and icons. [TWEAKED] Destroyer hangar bay would launch/retract helicopters into predictable collisions. [TWEAKED] Hatches can only be opened/closed from inside the building. [TWEAKED] Zeus-spawned units can be recruited by players of the same faction. [TWEAKED] Zeus can turn on/off vehicle lights & sirens, and selectable street lamps ( Headlights keybind when object selected ). [TWEAKED] General script optimisations. [FIXED] Some issues with FOB resupply detection. [FIXED] Flares ignited from sub-munitions were not despawning. [FIXED] VTOL throttle bug. (workaround, not fix as its an arma issue). [FIXED] Sit-down interaction would fail if player was not looking at correct part of chair object (arma bug). [FIXED] Duplication bug in Magazine Repack affecting underbarrel magazines. [FIXED] Respawn Vehicle action was available on ammo crates and other non-respawnable vehicles. [FIXED] Player could not use action menu if Zeus attached a task to them. [FIXED] Players could service their own vehicle from occupied enemy support vehicles.
  22. fn_Quiksilver

    admin and moderator zues

    in my experience, is best to just trust your team and give them full access. tell them if their actions cause people to leave the server they'll be removed tell them that to keep their zeus they need to run a 2-3hr op once a week for however many people are on
  23. Hi lads, had an interesting query over on the arma discord, thought I'd post the result for other modders: // QS Visible Lasers // Custom laser point offsets QS_laserOffset_array = [ // element format: ['arifle_mx_f',[0,0.25,0]], // element format: ['srifle_LRR_f',[0,0.25,0]], // element format: ['arifle_mx_f',[0,0.25,0]], // ETC ]; QS_laser_beamColor = [1000, 0, 0]; QS_laser_dotColor = [1000, 0, 0]; QS_laser_dotSize = 0.25; QS_laser_beamThickness = 0.25; QS_laser_beamMaxLength = 100; QS_laser_forceIR = FALSE; QS_fnc_updatePlayerWeaponObject = { if ((player getVariable ['QS_player_currentWeapon','']) isNotEqualTo '') then { player setVariable ['QS_player_currentWeapon','',FALSE]; }; if (!isNull (player getVariable ['QS_player_weaponObject',objNull])) then { player setVariable ['QS_player_weaponObject',objNull,FALSE]; }; if ((player getVariable ['QS_player_weaponMuzzlePos','']) isNotEqualTo '') then { player setVariable ['QS_player_weaponMuzzlePos','',FALSE]; }; if ((player getVariable ['QS_player_currentProxy','']) isNotEqualTo '') then { player setVariable ['QS_player_currentProxy','',FALSE]; }; _handPos = player modelToWorldWorld (player selectionPosition 'righthand'); _intersections = (lineIntersectsSurfaces [ _handPos vectorAdd [0,0,0.3], _handPos vectorAdd [0,0,-0.3] ]) + (lineIntersectsSurfaces [ _handPos vectorAdd [-0.3,0,0], _handPos vectorAdd [0.3,0,0] ]) + (lineIntersectsSurfaces [ _handPos vectorAdd [0,0.3,0], _handPos vectorAdd [0,-0.3,0] ]); if (_intersections isNotEqualTo []) then { private _weaponModel = toLowerANSI (getText (configFile >> 'CfgWeapons' >> (currentWeapon player) >> 'model')); _weaponModelArray = toArray _weaponModel; if ((_weaponModelArray select 0) isEqualTo 92) then { _weaponModelArray deleteAt 0; _weaponModel = toString _weaponModelArray; }; _intersections = _intersections apply { [_x # 2,toLowerANSI ((getModelInfo (_x # 2)) # 1),_weaponModel] }; private _weapon = objNull; { if (_weaponModel isEqualTo (_x # 1)) exitWith { _weapon = _x # 0; }; } forEach _intersections; if (!isNull _weapon) then { player setVariable ['QS_player_currentWeapon',toLowerANSI (currentWeapon player),FALSE]; player setVariable ['QS_player_weaponObject',_weapon,FALSE]; player setVariable ['QS_player_weaponMuzzlePos',toLowerANSI (getText (configFile >> "CfgWeapons" >> (currentWeapon player) >>'muzzleEnd')),FALSE]; private _customOffset = QS_hashmap_laserOffset getOrDefault [toLowerANSI (currentWeapon player),[0,0,0]]; private _currentProxy = ''; if ((currentWeapon player) isEqualTo (primaryWeapon player)) then { _currentProxy = ((player selectionNames 'memory') select { ['weapon.001',_x,FALSE] call BIS_fnc_inString }) select 0; if (_customOffset isEqualTo [0,0,0]) then { _customOffset = [0,0.3,0]; }; }; if ((currentWeapon player) isEqualTo (handgunWeapon player)) then { _currentProxy = ((player selectionNames 'memory') select { ['pistol.001',_x,FALSE] call BIS_fnc_inString }) select 0; if (_customOffset isEqualTo [0,0,0]) then { _customOffset = [0,0.25,0]; }; }; if ((currentWeapon player) isEqualTo (secondaryWeapon player)) then { _currentProxy = ((player selectionNames 'memory') select { ['launcher.001',_x,FALSE] call BIS_fnc_inString }) select 0; if (_customOffset isEqualTo [0,0,0]) then { _customOffset = [0,0.25,0]; }; }; player setVariable ['QS_player_laserCustomOffset',_customOffset,FALSE]; player setVariable ['QS_player_currentProxy',_currentProxy,FALSE]; }; }; }; QS_fnc_updateLaserPos = { _player = _this # 0; _weapon = _this # 1; [ (player modelToWorldVisualWorld ((player selectionPosition (player getVariable ['QS_player_currentProxy',''])) vectorAdd ((_weapon selectionPosition (player getVariable ['QS_player_weaponMuzzlePos',''])) vectorAdd (player getVariable ['QS_player_laserCustomOffset',[0,0,0]])))), (_player weaponDirection (currentWeapon _player)) ] }; if (!isNil 'QS_EH_94') then { removeMissionEventHandler ['Draw3D',QS_EH_94]; }; if (isNil 'QS_hashmap_laserOffset') then { QS_hashmap_laserOffset = createHashMapFromArray QS_laserOffset_array; }; player setVariable ['QS_toggle_visibleLaser',TRUE,FALSE]; player setVariable ['QS_player_currentWeapon','',FALSE]; player setVariable ['QS_player_weaponObject',objNull,FALSE]; QS_EH_94 = addMissionEventHandler [ 'Draw3D', { if (!isGameFocused) exitWith {}; if (isNull (objectParent player)) then { if ((player getVariable ['QS_player_currentWeapon','']) isNotEqualTo (toLowerANSI (currentWeapon player))) then { call QS_fnc_updatePlayerWeaponObject; } else { if ( (!isNull (player getVariable ['QS_player_weaponObject',objNull])) && ((player getVariable ['QS_player_currentProxy','']) isNotEqualTo '') && ((player getVariable ['QS_player_weaponMuzzlePos','']) isNotEqualTo '') ) then { ([player,(player getVariable ['QS_player_weaponObject',objNull])] call QS_fnc_updateLaserPos) params ['_laserStart','_weaponDirection']; if (player getVariable ['QS_toggle_visibleLaser',TRUE]) then { drawLaser [ (player getVariable ['QS_player_weaponObject',objNull]) modelToWorldVisualWorld _laserStart, _weaponDirection, QS_laser_beamColor, QS_laser_dotColor, QS_laser_dotSize, QS_laser_beamThickness, QS_laser_beamMaxLength, (((currentVisionMode player) isNotEqualTo 0) || QS_laser_forceIR) ]; }; }; }; }; } ]; removeAllUserActionEventHandlers ['headlights','activate']; addUserActionEventHandler ['headlights','activate',{ player setVariable ['QS_toggle_visibleLaser',!(player getVariable ['QS_toggle_visibleLaser',FALSE]),FALSE]; }];
  24. awesome work lads that "selectionVectorDirAndUp" is a game changer for stuff like this
×