Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripted 2D optics component #1105

Merged
merged 42 commits into from
Apr 13, 2019
Merged

Scripted 2D optics component #1105

merged 42 commits into from
Apr 13, 2019

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Mar 31, 2019

When merged this pull request will:

  • ports the BWA3 scripted 2d optics "framework" (turns it into one) to CBA

  • animated 2d scopes (recoil, zooming etc.)

  • iluminated reticles during the night

  • shows current magnification as ui element in the weapon info box

  • toggle setting between PIP background and darkened background

  • close Feature request: 2D scopes framework #1102

  • docs

  • example configs

  • function headers, variable tags

  • the settings

  • support for multiple weapons with carry handle optics

  • move some compatiblity stuff to ACE (arsenal, create events in events)

  • only init pip camera after setting enables system once

# Documentation #

@commy2 commy2 added the WIP label Mar 31, 2019
@commy2
Copy link
Contributor Author

commy2 commented Mar 31, 2019

Reminder to squash.

@commy2
Copy link
Contributor Author

commy2 commented Apr 3, 2019

Release of this would require acemod/ACE3#6921 (ACE Update), or it will go wrong in the ACE Arsenal.

@Blutze
Copy link
Contributor

Blutze commented Apr 3, 2019

As mentioned on the BWMod gitlab, unscoping currently resets magnification to the minimum. With the current state of the CBA weapon handling framework, this has to be triggered on every shot. Is there a way to prevent the magnification resetting, potentially extending to the vanilla Rangefinder and Laser Designators?

@commy2
Copy link
Contributor Author

commy2 commented Apr 3, 2019

That is just what happens in the base game when you unscope, right? I don't think that can be changed, as there is no command to set the current magnification by script.

@10Dozen
Copy link
Contributor

10Dozen commented Apr 4, 2019

That is just what happens in the base game when you unscope, right? I don't think that can be changed, as there is no command to set the current magnification by script.

Engine based optics mode is saved for modelOptics and discreteFov when changed via Num+.

Maybe GUI optics controls may be binded to same key as optics zoom (default: Num+/Num-) and it will control GUI and engine part same time? It will require optics attachement handler to reset scripted state when optics detached and replaced with new one.

@commy2
Copy link
Contributor Author

commy2 commented Apr 4, 2019

I don't understand how that is supposed to work. I have my doubts this can be achieved, but feel free to fork this branch and open a pull request...

@jonpas jonpas added this to the 3.11 milestone Apr 4, 2019
@commy2 commy2 removed the WIP label Apr 5, 2019
@commy2 commy2 modified the milestones: 3.11, 3.10.2 Apr 7, 2019
@commy2 commy2 merged commit 1589933 into master Apr 13, 2019
@commy2 commy2 deleted the scripted_optics_component branch April 13, 2019 15:14

_script ctrlAddEventHandler ["Draw", {
params ["_script"];
private _counter = ctrlParent _script getVariable "commy_fpsCounter";
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like forgotten debug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not debug, but doesn't belong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

Successfully merging this pull request may close these issues.

Feature request: 2D scopes framework
7 participants