View Single Post
  #5  
Old 04-23-2011, 03:59 PM
MadBlaster MadBlaster is offline
Approved Member
 
Join Date: Oct 2010
Posts: 666
Default

hi again.

yes, that script up there should work for elevator trim on mouse wheel too. the variable name is just that, a name. so if you want to call it var.elevatortrim or var.et or whatever, that will work.

also, somwhere around here I posted a fov/zoom script-- because the cLOD took away the past IL-2 keyboard functionality where you could zoom in/out incrementally. instead, clod uses the mouse to do that now

anyway you could substitute mouse.wheelup=true or mouse.wheeldown=true in that script for joystick1.pov1=90 and joystick1.pov1=270 and it should work. it is clunky because there is a "gate" at 30 fov. in other words, you have to enter the gate by tapping delete button, then you can zoom further. so there is a few microsecond delay in that script. i think at some point, they will probably patch back old il-2 functionality for the keyboard to make it smooth and can dump this script (fingers crossed).

here it is again, you have to measure your monitor in the vertical in mickeys to make it work (i.e.,where I have 870). you do that in glovepie.:

*GLOBAL
var.mcx=640/2 //game resolutions
var.mcy=480/2//game resolutions

if var.mcy=480/2 then //changes zoom variable when game resolution changes
var.mckmstr=480
elseif var.mcy=600/2 then
var.mckmstr=600
elseif var.mcy=768/2 then
var.mckmstr=768
elseif var.mcy=864/2 then
var.mckmstr=864
endif

*ZOOM [HotKey viewset]
if (joystick1.pov1=90.00 and var.a=0) then
key.PageDown=true //FOV to 90
key.PageDown=false
mouse.cursorposx=var.mcx //initilze cursor, var.mcx and var.mcy equal to game resolution divided by 2 so that mouse cursor is centered.
mouse.cursorposy=var.mcy
mouse.cursorposy=0 //intialize mickey count
var.mick=mouse.DirectInputY //initialize mickey count
var.a=1 //start action
endif
if (joystick1.pov1=90.00 and var.a=1) or (joystick1.pov1=90.00 and var.a=2) then //action
key.Alt=true //"hold to adjust field of view" mapped to Alt-Z
key.Z=true
mouse.DirectInputY=mouse.DirectInputY+20 //cursor moves -y direction, sensitivity set here
endif
if (abs(mouse.DirectInputY)-abs(var.mick) > var.mckmstr) and var.a=1 then //first stage ends
key.Delete=true //opens the door to further zoom
key.Delete=false
mouse.cursorposx=var.mcx //initilze cursor, var.mcx and var.mcy equal to game resolution divided by 2 so that mouse cursor is centered.
mouse.cursorposy=var.mcy
mouse.cursorposy=0 //initialize mickey count
var.mick=mouse.DirectInputY //initialize mickey count
var.a=2 //kick back to action
endif
if (abs(mouse.DirectInputY)-abs(var.mick) > var.mckmstr) and var.a=2 then //second stage ends
var.a=3
key.Alt=false //job done, turn off now
key.Z=false
endif
if released(joystick1.pov1=90.00) then
var.a=0 //reinitialize variables to do it again
var.mick=0
mouse.DirectInputY=0
key.Alt=false
key.Z=false
mouse.cursorposx=var.mcx //initilze cursor, var.mcx and var.mcy equal to game resolution divided by 2 so that mouse cursor is centered.
mouse.cursorposy=var.mcy
endif
if (joystick1.pov1=270.00) then //snap back to FOV 90
key.PageDown=true
key.PageDown=false
endif

Last edited by MadBlaster; 04-25-2011 at 12:08 AM. Reason: Updated for bug and improved for when you want to change resolutions, change global variables.
Reply With Quote