Garry's Mod

Garry's Mod

560 ratings
Blackhawk Extraction
2
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Entity
Addon Tags: Roleplay, Scenic, Realism
File Size
Posted
Updated
32.453 MB
23 May, 2023 @ 2:08pm
29 May, 2023 @ 2:43pm
5 Change Notes ( view )

Subscribe to download
Blackhawk Extraction

Description
QUICK START:
load gm_flatgrass in a singleplayer and execute in a console
blackhawk_extraction_cmd_deploy 1 demo 1
OR
blackhawk_extraction_cmd_deploy 2 demo
(if it gives error, execute this too: blackhawk_extraction_cmd_reloadPaths)
after that you can get back and read explanation below
or watch the video >> https://youtu.be/2G4VN1wwkIY <<

Features
  • Blackhawk that can be called to perform both infiltration or exfiltration
  • Has animated pilot inside with voicelines of Pequod
  • Can carry up to 5 people (including NPC!), each has individual sitting animation
  • Detects missiles, emits alert sounds and pops flares to counter them
  • Responds to damage with decals on body, smoke/fire come from engines and more
  • Cinematic falling sequence
  • Background music to make your entrance more epic
  • Tools to make NPC compatible (Models linker), building your own paths (Path creator)

Attention! It's vulnerable only to explosive type of damage.

Settings location: Q (Spawnmenu) -> Options -> Blackhawk Extraction

Console variables/commands:
<find blackhawk_extraction_cvar> / <find blackhawk_extraction_cmd>

Usage
Navigation
Blackhawk uses modified path_track point entities to move.
You have to create paths before being able to deploy blackhawk correctly.
It is possible with <Path creator> tool I made. It's not difficult, just follow instructions described in the tool panel (HELP form) or look at how demo path built.
When you created your own paths and saved them into files you must load them with command:
blackhawk_extraction_cmd_reloadPaths OR just perform map cleanup (special option must be ticked)
This removes existing paths and loads them again including new ones.
(from lua folder as well, you can share your paths on workshop by moving them from data/blackhawk_extraction/paths/mapname to lua/blackhawk_extraction/paths/mapname,
decompile addon to see how it is done if you really need this)
Other commands:
blackhawk_extraction_cmd_deletePaths - delete existing paths on a map (deletes entities, not saved paths)
blackhawk_extraction_cmd_loadPaths - generates saved paths without deletion of already spawned
path_track s of paths spawn automatically when a map is loaded, can be changed in settings.
Deployment
Everything is set up. It's time to call our Pequod. Main command is:
blackhawk_extraction_cmd_deploy <missionType> <pathToFollow> <passenger#1> <passenger#2> <passenger#3> <passenger#4> <passenger#5>
Where:
<missionType> - 1 = infiltration (Pequod waits until everyone gets out), 2 = exfiltration (waits until every passenger confirms exfiltration by pressing SPACE)
<pathToFollow> - name of a created path before, without file extension OR letter <n> (chooses path by the nearest landing zone)
<passenger#N> - indexes of entities that teleport into a blackhawk on its spawn, typically you would use this for infiltration
Examples:
blackhawk_extraction_cmd_deploy 1 "myPath" 1 - deploy a blackhawk to infiltrate(1) following "myPath" with us inside(1)
blackhawk_extraction_cmd_deploy 2 "myPath" - deploy a blackhawk to exfiltrate(2) following "myPath" with nobody inside
p.s. If you are in a singleplayer or hosting a multiplayer game your index is 1
(you can always find your index by executing this: lua_run_cl print(LocalPlayer():EntIndex())
What about NPC?
You can put them in by specifying indexes as well, BUT you must link their models to playermodels for DynaBase to work.
If you don't do that, ERROR model will be floating in a blackhawk instead of NPC.
It means NPCs that you want to see inside must have playermodels too.
Link models with another tool: Models linker (accessible only for admins)
It helps in creating models paths pairs. I already made links for default NPCs that come with Garry's mod, but for custom ones you have to do it yourself.
1. Change your playermodel to those one you want to pair NPC model with.
2. Take Models linker STool, aim at NPC and press Left Mouse Button.
3. Press Right Mouse Button to link the models (or R to unlink)
4. Right after you do that press E while holding the tool and check if an entry with your recent link was created.
Now you can put NPCs into a blackhawk, but before you must spawn them...
And get their index by executing in the console while looking at a needed NPC: lua_run_cl print(LocalPlayer():GetEyeTrace().Entity:EntIndex())
This command also can be used to retrieve other players' indexes.
Example:
blackhawk_extraction_cmd_deploy 2 "myPath" 48 68 39 87 - deploy a blackhawk to exfiltrate(2) following "myPath" with NPCs (or some players) inside
NPCs disembark automatically to cover you. Getting them back into blackhawk is not intended and can be done only via lua scripts.

Missile detection
Blackhawk tries to protect itself by popping flares when a missile is detected (in a radius of 5000 units).
If a missile is too close to a flare it explodes.
By default blackhawk reacts only to rpg_missile but you can add your projectiles:
blackhawk_extraction_cmd_addCustomMissile <missile_classname> <pathToSoundItMakesDuringFlight>
Example:
blackhawk_extraction_cmd_addCustomMissile "rpg_missile" "weapons/rpg/rocket1.wav"
Other commands:
blackhawk_extraction_cmd_removeCustomMissile
blackhawk_extraction_cmd_listMissileTypesToCounter

For developers
Classname: blackhawk_extraction_unit
List of events
You can put player/entity inside and vice versa with this method: blackhawkEntity:Use(plyOrNpc)

Known problems
Sometimes game crashes when a blackhawk is destroyed. Solution: -
Projectiles from other addons go through and cannot hit a blackhawk. Solution: -
Helicopter doesn't move after spawn. Solution: enable ai (paste into the console: ai_disabled 0)
lua_run_cl doesn't print anything to a console. Solution: sv_allowcslua 1
Helicopter spawn bombs on arrival. Solution: disable "Extended AI Navigation" addon.

Credits
2krev - for programming all of this and animating
Konami - Pequod voicelines (Metal Gear Solid V)
Sarah Schachner, Activision, Blizzard - Into The Furnace (Call of Duty Modern Warfare 2019)



[boosty.to]

Popular Discussions View All (3)
34
7 Jun @ 2:38pm
Help with Extraction
rapidhouse1425
0
27 May, 2023 @ 12:55pm
PINNED: [Dev] Events list
2krev
0
30 Jun @ 1:43pm
NPC's don't sit in the chairs
Toast564
356 Comments
adolf 1 Aug @ 12:35am 
this too hard
ziutek 25 Jul @ 10:03am 
skill issue
Stan_Jacobs 19 Jul @ 11:56am 
it works
gaming678 19 Jul @ 10:34am 
REDACTED_yt ITS BECAUSE THEY JUST WANT ANGRY GAMERS THERE LAPTOPS SO THEY JUST DELETE THEM
gaming678 19 Jul @ 10:26am 
DUDE IT DOSENT CREATE IT
gaming678 19 Jul @ 10:25am 
its too complcatied MAKE A SIMPLER VERISON
OkamI ito 28 Jun @ 2:49pm 
it works its just a bit hard to learn also if it doesnt work and shows the plane as a error uninstall then reinstall (unisnstall by the addonlist) then it will show the other things to download then leave and reopen gmod (it might not work, but it worked for me)
REDACTED_yt 22 Jun @ 2:44pm 
dude when i relaod the pats it realoads them then deleted them. it dosent work T_T
soldierassault 6 Jun @ 4:16pm 
how to open the door thingy?
swat 6.0 20 May @ 10:40pm 
forget, I fixed it by reinstalling