-
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
Explosives - Improve Support for custom IED ringtones #10731
base: master
Are you sure you want to change the base?
Conversation
I was wondering whether it would be better to use a variable for the sounds instead of the config, or at least provide that option as well. It would make it easier to use in mission files. |
Co-authored-by: PabstMirror <[email protected]>
* Dials the number passed and detonates the explosive. | ||
* |
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.
Rogue change.
|
||
params ["_unit", "_code"]; | ||
TRACE_2("params",_unit,_code); |
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.
Same.
_ringtone params ["_ringtonePath", "_ringtoneLenght"]; | ||
|
||
//Calculate the ringtone duration before detonation with slight randomness | ||
private _ringtoneDuration = round(count _arr - (_ringtoneLenght + (random 1.5)- 0.75) / 0.25) max 4; |
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.
_ringtoneLenght + (random 1.5)- 0.75
seems to be too specific to the existing ringtone. Why not just use random _ringtoneLength
instead?
Or even better: Why not use the config attribute to add randomness on line 24?
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.
I think random _ringtoneLength
might have issues with longer ringtones. 4s ringtone could blow up after 2s of the ringtone end.
Or even better: Why not use the config attribute to add randomness on line 24?
not sure what you mean? Do you mean that add new config for (ceil(random 8)) + 1
, so instead of this this random 9s calling time, make it config entry with min1 check?
if ([_unit, -1, (_item # 0), (_item # 2), "ACE_Cellphone"] call FUNC(checkDetonateHandlers)) then { | ||
playSound3D [QUOTE(PATHTO_R(Data\Audio\Cellphone_Ring.wss)), objNull, false, (getPosASL (_item # 0)), 3.16228, 1, 75]; | ||
playSound3D [_ringtonePath, objNull, false, (getPosASL (_item # 0)), 3.16228, 1, 75]; |
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.
If we are adding the ability to play custom sound files, then adding the pitch, volume and distance to the config should be an option.
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.
Added this
Co-authored-by: johnb432 <[email protected]>
Co-authored-by: johnb432 <[email protected]>
Co-authored-by: Jouni Järvinen <[email protected]>
Co-authored-by: johnb432 <[email protected]>
Co-authored-by: johnb432 <[email protected]>
Co-authored-by: johnb432 <[email protected]>
When merged this pull request will:
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.