Page MenuHomeFeedback Tracker

introduce "WeaponReloaded", "WeaponSelected" and "HandleCameraView" event handlers
Reviewed, WishlistPublic

Description

Please add "WeaponReloaded", "WeaponSelected" and "HandleCameraView" event handlers. As it stands there is no fast and efficient way of detecting those events, but run a script loop constantly checking on condition for player weapon or cameraView. With weapon reload this is even more awkward.

"HandleCameraView" should be overridable, so that it is possible to deny 3rd person view for example in certain situations and not all together as the only option currently possible.

"WeaponReloaded" returns

_this select 0 - object - unit it is assigned to
_this select 1 - string - weapon that is reloaded
_this select 2 - string - muzzle that is reloaded
_this select 3 - array - magazine that is inserted ["class", ammocount, id]
_this select 4 - array - magazine that is removed ["class", ammocount, id]

"WeaponSelected"

_this select 0 - object - unit it is assigned to
_this select 1 - string - weapon that is selected
_this select 2 - string - muzzle that is selected

"HandleCameraView"

_this select 0 - object - unit it is assigned to
_this select 1 - string - new cameraView (internal, external, gunner, group)
_this select 2 - string - old cameraView

returning true overrides the change and no cameraview change happen.

Alternatively make this event handler fire before cameraview change rendered so that it is possible to set camera view to desired view seamlessly in the same frame with switchCamera

for example

if (_this select 1 == "External") then {_this select 0 switchCamera "Internal"}

Details

Legacy ID
3086438784
Severity
None
Resolution
Open
Reproducibility
Always
Category
Feature Request

Event Timeline

Killzone_Kid edited Additional Information. (Show Details)
Killzone_Kid set Category to Feature Request.
Killzone_Kid set Reproducibility to Always.
Killzone_Kid set Severity to None.
Killzone_Kid set Resolution to Open.
Killzone_Kid set Legacy ID to 3086438784.May 7 2016, 7:22 PM
Bohemia added a subscriber: AD2001.Sep 4 2014, 10:26 AM

I haven't used event handlers alot so far, but to my understanding, you should be able to create an event handler fireing on <i>"AnimChanged"</i> and/or <i>"AnimDone"</i> and/or <i>"AnimStateChanged"</i>.

Then you could simply check which animation has been made and if it was the reload animation (don't know the anim code right away), you execute your desired code on <i>"AnimDone"</i>.

@Johhnny I hereby challenge you to come up with decent workaround to these problems! To save you time, none of the anim event handlers trigger for gesture animations like reloading. Good luck!

Pardon me, Sir. I've just started learning SQF half a year ago and though I consider myself pretty capable already, I still admire your skill and what you've presented on your website so far which is why I still very often accept your word as fact (except for this ticket ... so far ;o) ).

So excuse me if I'm not familiar with certain SQF quirks and limits. The sad thing is that the SQF basics are confidential, so we won't find out how in detail the commands "publicVariable" or "move" work which I personally am very interested to know.

Anyway, I'll develop and try and probably make the same experiences as you. But as nobody's perfect, neither are you and me. ;-)

Best regards,
Johnny

P.S.: I'd like to say "Challenge accepted", but you know ... your word and fact and such. ^_^

Nah man it is cool, there things in Arma that even developers don't know about ;) Trying to figure out how to solve limitations is actually pretty interesting game in itself until you hit a wall, and like in this particular case, it is a bit futile. I personally couldn't find an acceptable workaround but this doesn't mean there isn't one.