-
Notifications
You must be signed in to change notification settings - Fork 737
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
Add ability to set aiming coefficient for mission scripting. #5828
Conversation
…handleEffects to use new function instead of setCustomAimCoef
*/ | ||
#include "script_component.hpp" | ||
|
||
params ["_unit","_id", "_setting", ["_add", true]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space after ["_unit",
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@jlillis @xrufix any thoughts on this PR and #5773 They both do similar but different things to the same system. I don't think it's a problem to add both (will be some minor merge conficts but should be easy to resolve) |
I think it would be better to modify #5773 so that when swayFactor is 0, advanced fatigue does not update setCustomAimCoef anymore. This would allow mission makers to customize the aiming coefficient in their own scripts. |
I think #5773 does something different. It will enable mission editors to change the impact of fatigue on weapon sway, not weapon sway itself (at least, not directly). It adds a factor which is multiplied with fatigues current setting. E.g. when you want to My proposed solution does instead affect weapon sway directly. By checking for the highest set weapon sway, it produces more reliable and predictable results if a certain AimCoef is desired. Merging and keeping both could be easily done and would imho be the best solution. |
* Handle set AimCoef calls. Will use highest available setting. | ||
* | ||
* Arguments: | ||
* 0: unit <OBJECT> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit
* | ||
* Arguments: | ||
* 0: unit <OBJECT> | ||
* 1: id <STRING> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ID
* Arguments: | ||
* 0: unit <OBJECT> | ||
* 1: id <STRING> | ||
* 2: settings <NUMBER> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Settings
and maybe add a note in ()
describing what exactly is meant.
* 0: unit <OBJECT> | ||
* 1: id <STRING> | ||
* 2: settings <NUMBER> | ||
* 3: add [true] OR remove [false] (default: true) <BOOL> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add (true) or remove (false) <BOOL> (default: true)
@jonpas Requested changes addressed. I also changed the file where i copy-pasted from. |
Easy fix :) |
Sorry for digging the old post, but has this issue been solved? If so, what is currently the correct way to set the custom aim coefficient? Update: |
@Tee-ee-ee Please open a new issue to adress this. |
Add ability to set aiming coefficient for mission scripting.
When merged this pull request will:
setCustomAimCoef
.I would however prefer a framework for similar functionality (having a max/min setting that can be set by different functions/scripts).