PDA

View Full Version : A neat way to "smoothly" zoom in/out



Lurch1962
03-05-2007, 04:54 PM
This was inspired by the way Shockwave's BoB (which I don't yet have) executes a smooth zoom.

In Il2 there are 12 FOV settings from widest to narrowest, in 5 degree-wide increments.

I have a CH USB HOTAS set-up, and I've always had the FOV function mapped to the Throttle's index finger 4-way hat. Until now I've only ever used three settings for FOV; widest, normal (60 degree) and narrowest. On the hat, pushing forward selected the narrowest, pulling back selected the widest, and pushing right selected the normal FOV.

But the other night I had a brainstorm, whereby I would actually make use of these two controls in Il2; "increase FOV" and "decrease FOV", which I've assigned to the square bracket keys. In the CH software I added the following two lines to my PF map:

SmoothZoomIn KEYS +] -] +] -] +] -] +] -] +] -] +] -] +] -] +] -] +] -] +] -] +] -] +] -]
SmoothZoomOut KEYS +[ -[ +[ -[ +[ -[ +[ -[ +[ -[ +[ -[ +[ -[ +[ -[ +[ -[ +[ -[ +[ -[ +[ -[

There are 12 generated keystrokes for each macro, which are sent, e.g., as a stream of "press ], release ], press ], release ]...."

The rate at which the keystrokes are sent depends on the RATE value defined for the profile. I forget what mine is, but 12 keystrokes are sent in about 3/4 of a second, or about 16 per second.

So now the fore/aft action on the aforementioned throttle hat switch fairly smoothly zooms my view in and out (I've kept the normal FOV mapped as before). This is less jarring than an instantaneous zoom -- it works quite well!

--Lurch--

Waldo.Pepper
03-05-2007, 05:43 PM
You are a friggin' genius! I think I shall invent a time machine, go back two years and do the same thing! http://forums.ubi.com/images/smilies/16x16_smiley-wink.gif

http://forums.ubi.com/eve/forums/a/tpc/f/23110283/m/460...891079123#3891079123 (http://forums.ubi.com/eve/forums/a/tpc/f/23110283/m/4601038123/r/3891079123#3891079123)

Chris0382
03-05-2007, 06:05 PM
Could you do the same using an Interval timer or a While sequence.

Lurch1962
03-05-2007, 08:29 PM
Chris,
Not sure what you mean by "Interval timer" and While sequence." They sound like BASIC (or other) programming commands outside of the utilities that come with various joysticks (of which only Thrustmaster and CH am I familiar with.)

--Lurch--

Flying_Nutcase
03-05-2007, 09:05 PM
You bring honor to the much maligned name of Lurch. Oh, that's Lerch with an 'e'. Anyway, good show and mucho gracious!

Bearcat99
03-05-2007, 09:27 PM
I already do that with my X-45 throttle.. http://forums.ubi.com/images/smilies/winky.gif

LEXX_Luthor
03-05-2007, 09:35 PM
Smooth zoom control is a core feature needed for dogfight gameplay. In the stock FB/PF system, you change zoom (field of view) by instant jumps between zoom states, and the view is totally different, and you lose sight of small target dots or small aircraft and surface unit models. The first time I practiced a dogfight in StrikeFighters, after ramping up the horribly slow default zoom and view panning controls, it was the most immersive dogfight experience I ever had (me in Su-7, against AI B-57, what a Noob I was). I was so used to fearing change of zoom when flying FB/PF, but now in SF, I do it all the time, naturally, without thinking.

Good work, Aussom! This is what modding is all about! Although I don't have CH, just a simple but heavy duty WW2-esque joystick and still the best stick made (Saitek Graphite, the black one, 20$ at WalMarts if you can stand entering that place).

Chris0382
03-06-2007, 06:53 AM
The Interval timer and While Sequence are used in scripting in the CH-MANAGER program to execute a keystroke repeatibly on-off. So while you hold a button down you will get repeating on-offs of the [ keystroke. You also have provisions to set the time between the keystrokes to make it go faster or slower.
Both do the same thing and some people like the While Seq. and some like the Intvl Timer.

Like a speed controlled turbo button (set ammo to unlimited and tear loose with bombs)

The below sample are for ZOOMING in and you will do the same for zooming out but with the ] keystroke.

//While Sequence (executes alternating press/release while held)

SEQUENCE
WHILE( JS1.B7 );
CMS.B1 = TRUE; //Press
DELAY( 2 );
CMS.B1 = FALSE; //Release
ENDSEQUENCE

Delay is variable time between on-offs
CMS.B1 will be assigned "[" keystroke
JS1-B7 is the top button of my 4-way hat on combatstick
CMS.B1 is a virtual button assinged "[" in the CMS tab of CManager

//The interval timer (more like a pulse button; sends pulses while held but also releases)

TIMER ( INTERVAL, D1, 1, 2 ) = JS1.B7;
CMS.B1 = D1;

2 = timed interval between keystrokes
CMS.B1 will be assigned "[" keystroke
JS1-B7 is the top button of my 4-way hat on combatstick
CMS.B1 is a virtual button assinged "[" in the CMS tab of CManager

Visit us at the CH-Hanger if you like to learn more.

http://www.ch-hangar.com/forum/index.php

Lurch1962
03-06-2007, 12:04 PM
Chris,
Ahhhh, now I see. I wasn't familiar with this because I haven't used the scripting feature at all--just kept to the simple stuff, which has worked fine for me so far.

Thanks!

--Lurch--

Chris0382
03-06-2007, 01:06 PM
I kept it simple at first but once I got into scripting a whole new world opened up and I got addicted to its power.

If you ever see someone in BF1942 scooting along the ground like an inchworm on steroids, it may be me.

Sokol__1
03-06-2007, 07:48 PM
Yea! Based in ours tutos i found a way to zoom in IL2 whit no programable sticks.

Using the freeware SVMapper - written by the guys of AviaForum to programming Mjoy16 board - i map one HAT (up/down) for zoom, with these simple strings:

http://img240.imageshack.us/img240/771/svmapperoz0.jpg (http://imageshack.us)

SVMapper:
http://forum.sukhoi.ru/attachment.php?attachmentid=70120&d=1172927942
http://forum.sukhoi.ru/showthread.php?t=46137
Sokol1