Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Vehicle quick mount #29

Closed
wants to merge 46 commits into from
Closed

Vehicle quick mount #29

wants to merge 46 commits into from

Conversation

jameslkingsley
Copy link
Contributor

@jameslkingsley jameslkingsley commented Jul 11, 2016

When merged this pull request will:

  • Add the quick-mount keybind that when pressed will mount the player into the vehicle based on direction and distance

The idea of this module is to provide a fail-safe for when action menus fail to appear when you're trying to quickly mount a vehicle. An example is when you're running towards an extraction helicopter and you're unable to get in when in real life you know you should be able to.

It works by drawing a line from the players camera direction, projected X meters forward. It then picks the nearest vehicle from that list and moves on to the get-in code.

Demonstration: https://www.youtube.com/watch?v=3LWhYdG02xQ

  • Detect nearest eligible vehicle based on distance and direction of player
  • Move player into an empty vehicle position (priority order: driver, gunner, commander, cargo)

@nicolasbadano
Copy link

I like the idea. Let me know if you need assistance.

@BaerMitUmlaut
Copy link
Member

Can you make sure that when you get in on the left side of a Little Bird for example, you land on the left bench and not on the right one?

@jameslkingsley
Copy link
Contributor Author

I'm not sure how to go about doing that. The move-in stuff is still quite messy - I didn't want to have it just pop you in instantly, but the GetInXXX stuff doesn't seem to work.

@jonpas
Copy link
Member

jonpas commented Jul 11, 2016

I feel like this could be something for ACE3 itself.

@nicolasbadano
Copy link

nicolasbadano commented Jul 11, 2016

Can you make sure that when you get in on the left side of a Little Bird for example, you land on the left bench and not on the right one?

@BaerMitUmlaut, I think that's currently not possible to do (at least reliably). I remember @PabstMirror saying something about not all vehicle positions having proper selections or something like that. Is that right Pabst?

@PabstMirror
Copy link
Contributor

It's really not a simple problem to fix.

See acemod/ACE3#273
The getIn memoryPpoints can be an array and we can't seem to access them.

moveInXXX has some problems, it's going to ignore locked vehicles and I think it doesn't trigger the getIn event. But it also allows mixed teams to enter the same vic (loading civilians into a vehicle can be a real pain)

I think doing player action ["getInX", vic] should be safer.

We probably want an ace_setting to enable/disable, and possibly another setting to allow mixed teams to enter the same vic?

reverse _objects;
private _target = _objects param [0, objNull];

if (!isNull _target && {{_target isKindOf _x} count ["Air","LandVehicle","Ship"] > 0}) then {

Choose a reason for hiding this comment

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

1- Should you check if the _target is alive too?

2- I think you should add StaticMortar to the list too

displayName = ACECSTRING(common,Enabled);
description = CSTRING(KeybindDescription);
isClientSettable = 0;
force = 1;

Choose a reason for hiding this comment

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

Don't force it; it will prevent it being settable on the mission level.

description = CSTRING(KeybindDescription);
isClientSettable = 0;
force = 1;
values[] = {"0m", "1m", "2m", "3m", "4m", "5m", "6m", "7m", "8m", "9m", "10m"};

Choose a reason for hiding this comment

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

This line should be removed.

@jameslkingsley
Copy link
Contributor Author

Is there any interest in having a double-tap the quick-mount key to eject?

@jonpas
Copy link
Member

jonpas commented Aug 1, 2016

Isn't eject already bindable loke that in vanilla controls?

@jameslkingsley
Copy link
Contributor Author

Oh yeah, forgot about that

Copy link
Contributor

@thojkooi thojkooi left a comment

Choose a reason for hiding this comment

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

Hi @jameslkingsley what is the status on this?

private _hasAction = false;

{
private _unit = _target call compile format ["assigned%1 _this", _x];
Copy link
Contributor

@thojkooi thojkooi Sep 20, 2016

Choose a reason for hiding this comment

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

This seems slightly strange. Might there be a better way to do this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure there is, unless it was just hard-coded and repeated.

@jameslkingsley
Copy link
Contributor Author

We've been using this for quite some time now and haven't noticed any issues. If you think it fits ACE itself then I'm happy to port it to that instead.

@jonpas
Copy link
Member

jonpas commented Sep 20, 2016

I would say it fits ACE3 itself.

@jonpas jonpas modified the milestones: 3.1.0, 3.2.0 Oct 18, 2016
@jameslkingsley
Copy link
Contributor Author

jameslkingsley commented Oct 29, 2016

Should I add a check for the velocity of the target vehicle and limit it to stationary/slow moving vehicles?
Not sure if that's how it works..

@jonpas
Copy link
Member

jonpas commented Oct 29, 2016

That sounds like a good check. No jumping on helicopter flying very slow. 😆

@jonpas
Copy link
Member

jonpas commented Feb 21, 2017

Will be moved to ACE3 as per discussions!

@jonpas jonpas closed this Feb 21, 2017
@jonpas jonpas removed this from the 3.2.0 milestone Feb 21, 2017
@SGTGunner
Copy link

What is the criteria that allows a mod/feature move from ACEX to ACE3? thx.

@jonpas
Copy link
Member

jonpas commented Feb 21, 2017

Depends on the scope. ACE3 is generally anything that improves realism or very useful gameplay elements. ACEX is anything else that is still somewhat realistic and improves something. Vaguely said, we don't really have any set-in-stone guidelines for that, we usually decide per case basis.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants