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
  #5  
Old 04-21-2011, 09:57 PM
MadBlaster MadBlaster is offline
Approved Member
 
Join Date: Oct 2010
Posts: 666
Default

Quote:
Originally Posted by MadBlaster View Post
I wrote a brake glovepie script that may work for you. It works this way.

one button increases overall brake pressure (both wheels) by 10% each time it is pressed. another button decreases overall brake pressure by 10% each time it is pressed. if it turn my rudder outside a deadzone, the brake pressure on the outside wheel decreases proportionally with the rudder, so the plane turns easier. the script is also enhanced with verbal commands (say"more" and brake pressure increases 10%, say "less" and brake pressure decreases by 10%). Anyway, you need to set up virtual joystick in ppjoy to make it work and put those virtual axis in your confuser.ini. Here it is if you want to try and make it work for you:

*BRAKES (in order to use rudder for independent braking, the brake must first be on)
if var.brake=0 then
var.brake=-1
var.ltbrake=var.brake
var.rtbrake=var.brake
say"brake is off"
elseif var.brake>1 then
var.brake=1
say"maximum brake"
elseif var.brake<-1 then
var.brake=-1
say"brake is off"
endif
if (released(joystick1.button7) and var.brake>=-1) or (said("more",5) and var.brake>=-1) then
var.brake=var.brake+.2
say"more"
elseif (released(joystick1.button and var.brake>=-1) or (said("less",5) and var.brake>=-1) then
var.brake=var.brake-.2
say"less"
elseif said("release brake",5) or helddown(joystick1.Button8,1 second) then
var.brake=-1
var.ltbrake=var.brake
var.rtbrake=var.brake
say"brake is off"
elseif said("landing gear",5)
var.brake=-.6
var.ltbrake=var.brake
var.rtbrake=var.brake
elseif said("full brake",5) or helddown(joystick1.Button7,1 second) then
var.brake=1
var.ltbrake=var.brake
var.rtbrake=var.brake
wait var.stnddelay
say"maximum brake"
elseif said("half brake",5)
var.brake=-.01
var.ltbrake=var.brake
var.rtbrake=var.brake
wait var.stnddelay
say"half brake"
endif
if var.brake>-1 then
var.pright=roundto(ensuremaprange(joystick2.z,.2,1 ,0,1),-2)
var.pleft=roundto(ensuremaprange(joystick2.z,-.2,-1,0,1),-2)
if (joystick2.z>=.2) then
if var.brake<=0 then
var.rtbrake=roundto(var.brake,-1)
var.ltbrake=roundto(var.brake+((-1-var.brake)*var.pright),-1)
elseif var.brake>0 then
var.rtbrake=roundto(var.brake,-1)
var.ltbrake=roundto(var.brake+((-var.brake-1)*var.pright),-1)
endif
elseif (joystick2.z<=-.2) then
if var.brake<=0 then
var.ltbrake=roundto(var.brake,-1)
var.rtbrake=roundto(var.brake+((-1-var.brake)*var.pleft),-1)
elseif var.brake>0 then
var.ltbrake=roundto(var.brake,-1)
var.rtbrake=roundto(var.brake+((-var.brake-1)*var.pleft),-1)
endif
elseif (joystick2.z>-.2 and <.2) then
var.rtbrake=roundto(var.brake,-1)
var.ltbrake=roundto(var.brake,-1)
endif
endif
Sorry, forgot to post this part. Variables map to these virtual axis:

*OUTPUT TO GAME AXIS
ppJoy2.Analog4=var.rtbrake /*Joystick4+AXE_U=1brakesrt*/
ppJoy2.Analog5=var.ltbrake /*Joystick4+AXE_V=1brakeslt*/

i.e., (you would set similar virtual axis up in your confUser.ini file.
Reply With Quote
 


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 10:31 PM.


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