Page 1 of 1

Suppression causing Bullet Deviation by Breaking Zoom?

Posted: 2020-03-04 22:25
by staylor18
Hi there.

I have been trying to get a suppression effect that changes bullet devation. Looking around all over the internet it seems that it is impossible to alter the bullet deviation directly as it is a function of each weapon. My current attempt is trying to get suppression to break your zoom. That is “unzoom” your weapon. This will mean firing from the hip only when suppressed and therefore change the bullet deviation in a round of bout way.

I have been trying to add different lines to HudElementsHit.con (Menu_server/HUD/HudSetup) with no success.

I noticed that in HudElementsKilled.con there are:

Code: Select all

hudBuilder.setNodeShowVariable 				KilledState
hudBuilder.setNodeLogicShowVariable			EQUAL HudState 0
I am assuming this is what “unzooms” your weapon when you are killed, but it is not going to work for what I need. The only other actions that cause unzoom in game I know of are reloading and switching weapons.

Is there some HudState or GuiIndex number or some other command that could be used?

Any help or links to other attempts is much appreciated. Thanks.

Re: Suppression causing Bullet Deviation by Breaking Zoom?

Posted: 2020-03-05 10:34
by AlonTavor
Any magic server-side solution that changes deviation will not be networked to the client and the client will suffer from prediction errors. Same thing with unzooming the weapon.

Forcing the client to unzoom (not that I can think of any method, it is definitely not controlled by any HUD stuff) is a terrible idea because you can't unzoom while in the zooming in animation, its going to be really clunky.

Engine really not built for this

Re: Suppression causing Bullet Deviation by Breaking Zoom?

Posted: 2020-03-06 05:56
by staylor18
Thanks for the reply. I guess I will have to think of something else.

Re: Suppression causing Bullet Deviation by Breaking Zoom?

Posted: 2020-03-09 05:32
by staylor18
I have found one way to do it. It involves having a transparent .tga over the zoomed view and then another transparent .tga when you are hit/suppressed.

If you are zoomed and suppressed both transparent .tga pictures show up together and you cannot see anything at all. This forces the player to unzoom (hip firing) where there is now just the one transparent .tga picture (from hit/suppression) and can therefore aim. This in a round of bout way causes bullet deviation to increase due to the difference between being zoomed/ unzoomed.

Unfortunately it is not that practical as to completely obscure the view when zoomed you need about and 15% transparency for both layers

Code: Select all

hudBuilder.setNodeColor 	        0 0 0 0.85               (0.85 is opaqeness or 0.15 transparency)
This means you cannot see very well at all when using the scope normally