Skip to content

Replace createVehicleCrew with fn_createCrew#963

Closed
PiG13BR wants to merge 19 commits intoKillahPotatoes:v0.96.8from
PiG13BR:v0.96.8
Closed

Replace createVehicleCrew with fn_createCrew#963
PiG13BR wants to merge 19 commits intoKillahPotatoes:v0.96.8from
PiG13BR:v0.96.8

Conversation

@PiG13BR
Copy link

@PiG13BR PiG13BR commented Aug 28, 2024

Q A
Bug fix? no
New feature? no
Needs wipe? no

Description:

  • Ditch createVehicleCrew command and replace it with a function that uses preset configuration only. Now you can put a different faction assets in the same preset without spawning crew that not fit into your scenario.
  • The function checks what kind of vehicle is to get the correct type of crew.
  • The function tries to find empty seats for driver, gunner and commander. For the turret seat (generally from helicopters), only gets the co-pilot.

Content:

  • [ x] Add new function called fn_createCrew
  • [ x] Replace all createVehicleCrew command in the files
  • Put the new variables (used in the function) in other presets

Successfully tested on:

  • [ x] Local MP
  • [ x] Dedicated MP

@some-evil-kitty
Copy link
Collaborator

Most presets don't have pilots and crew defined yet - maybe add some logic inside the function to default to something if they're not defined? I was thinking rifleman for crew at the very least.

@PiG13BR
Copy link
Author

PiG13BR commented Sep 1, 2024

Yes, I can do that for now, but I could also add those variables on the other presets aswell, it's boring but I can do it with time. Tell me if this is worth it so I can manage my time to add them.

@PiG13BR
Copy link
Author

PiG13BR commented Sep 2, 2024

Done. I've put the placeholder types of crew that already exist on presets for each side.

@veteran29 veteran29 added the enhancement New feature or request label Oct 9, 2024
PiG13BR and others added 3 commits October 9, 2024 13:51
- Add BIS_fnc_vehicleCrewTurrets to simplify the script.
- Removed the MPKilled event (createManagedUnit already add this event)

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
@veteran29 veteran29 added this to the v0.96.8 milestone Oct 9, 2024
carlmylo added a commit to moistbois/Moist-Liberation-APR that referenced this pull request Nov 17, 2024
Adapted from main KP-Liberation PR.
Only edits were to adjust the player custom.sqf file as we use our own array setup.
As the original PR says, we'll need to add the new variables in presets (KPLIB_o_crewman, KPLIB_o_pilot, KPLIB_b_crewStatic).

More info here: KillahPotatoes#963

Co-Authored-By: Filip Maciejewski <4293906+veteran29@users.noreply.github.com>
Co-Authored-By: PiG13BR <170875982+pig13br@users.noreply.github.com>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we nix this change? It's out of scope and covered by #970

@veteran29 veteran29 self-requested a review December 4, 2024 15:07
@PiG13BR
Copy link
Author

PiG13BR commented Jul 14, 2025

Last time that I tested this, BIS_fnc_vehicleCrewTurrets works like createVehicleCrew, which sometimes misses some of the seats in vehicles that I want the AI to fill it.
I'm going to make a new PR of it in another branch. I need to restore mine to the original one.

@PiG13BR PiG13BR deleted the branch KillahPotatoes:v0.96.8 July 15, 2025 00:36
@PiG13BR PiG13BR closed this Jul 15, 2025
@PiG13BR PiG13BR deleted the v0.96.8 branch July 15, 2025 00:36
@PiG13BR PiG13BR restored the v0.96.8 branch July 15, 2025 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants