04.12.2009, 21:35
Sure thing Mr Slipper. I uploaded a little zip file with everything already prepared, so it will be easiest to just get that. It includes the sound file.
http://hem.bredband.net/mikko.artist/il2...outmod.zip
I inserted a detailed explanation to make it as understandable as possible. No point in you spending a whole night like I did trying to puzzle things together from the AHK help files
While I haven't made a proper sound file, I took a very stressful urgent "oh shit!" sound byte from Robotech (the 1985 anime series) edited to be a few seconds long to be played, and it sure enhances the "oh shit have to bail out right now OMG" feeling. It is in the zip file also.
The things you need to make this work is:
1. AutoHotKey installed
2. Make sure the binds in the script match those in IL2 (easily done by adjusting either).
3. It does not matter where you run the script file from, but you have to have the sound file in the place you specify in the script, or else the sound won't play. I put it to C:\il2bailoutmod.
http://hem.bredband.net/mikko.artist/il2...outmod.zip
I inserted a detailed explanation to make it as understandable as possible. No point in you spending a whole night like I did trying to puzzle things together from the AHK help files
While I haven't made a proper sound file, I took a very stressful urgent "oh shit!" sound byte from Robotech (the 1985 anime series) edited to be a few seconds long to be played, and it sure enhances the "oh shit have to bail out right now OMG" feeling. It is in the zip file also.
The things you need to make this work is:
1. AutoHotKey installed
2. Make sure the binds in the script match those in IL2 (easily done by adjusting either).
3. It does not matter where you run the script file from, but you have to have the sound file in the place you specify in the script, or else the sound won't play. I put it to C:\il2bailoutmod.
Quote:;----------------------------------------------------------
; STAYING IN COCKPIT + PLAYING SOUND WHEN BAILING OUT
;----------------------------------------------------------
2joy16::
SoundPlay, C:\il2bailoutmod\bailout.wav
send o
send ^E
send {F1}
return
; EXPLANATION BELOW
;
;"2joy" = second joystick device | "16" = joystick button 16 | "::" = if the button(s) before this mark is pressed, then execute whatever lines we put after. This line is the trigger for the whole event. Any key can be used, even a simple keyboard key (go ahead and try any simple key you want). I have it on a joystick button since I don't use the keyboard when flying.
;"SoundPlay, " = the command to play a sound file | "C:\il2bailoutmod\bailout.wav" is the path to the sound file to play.
;"send o" = press and release "o" on keyboard. I bound this to toggle canopy in IL2, just to see how it works.
;"send ^E" = press and release CTRL E on keyboard. The "^" mark means CTRL. If CTRL E is bound to bail out in IL2, this will initiate the bail out.
;"send {F1} = press and release F1 on keyboard. All keys that have their own name must be written inside the { } marks, otherwise it will type "F1" text instead. This is bound to 'cockpit view' by default in IL2, and this makes the view instantly return to cockpit view after the CTRL E bailout command puts us in third person view.
;"return" = This must be put in to make the command usable more than once, at least I think so.