Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > Technical threads > Controls threads

Controls threads Everything about controls in CoD

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 07-06-2012, 08:12 AM
Artist's Avatar
Artist Artist is offline
Approved Member
 
Join Date: Jan 2010
Posts: 362
Default

The Autohotkey solution (using the North/South of a POV hat), assuming that <Ctrl>+<Insert> ("Control Insert") is assigned to Camera, Keys, "Hold to adjust Field of View":

Code:
#Persistent
iIdStick = 1
SetTimer, watchPOV_Stick, 5

watchPOV_Stick:
    bFirst := true
    while(true){
        GetKeyState, iPOV, %iIdStick%JoyPOV  ; Get position of the POV control.

        ; Some joysticks might have a smooth/continous POV rather than one in fixed increments.
        ; To support them all, use a range:
        if iPOV < 0                                            ; No angle to report
            break
        else if (iPOV > 31500) OR (iPOV >= 0 AND iPOV < 4500){      ; 315 to 360 to 45 degrees: Forward
            zoomViewIn(bFirst)
            bFirst := false
        }
        else if (iPOV >= 13500) AND (iPOV <= 22500){           ; 135 to 180 to 225 degrees: Backward
            zoomViewOut(bFirst)
            bFirst := false
        }
        else
            break
    }
    return

zoomViewOut(bFirst){
    if(bFirst){
        MouseMove 0, 1200, 0
    }
    Send !{Insert down}
    MouseMove 0, -1, 0, R
    Send !{Insert up}
    return 0
}    
zoomViewIn(bFirst){
    if(bFirst){
        MouseMove 0, 0, 0
    }
    Send !{Insert down}
    MouseMove 0, 1, 0, R
    Send !{Insert up}
    return 0
}
Artist

Originally posted in the thread How is variable zoom done?
__________________
Ceterum censeo the mixture axis should be supported in IL-2 1946' DeviceLink.

-------------------------------------------------------------
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:10 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.