Author Topic: Cougar Code  (Read 261 times)

Offline GunnerCAF

  • Silver Member
  • ****
  • Posts: 946
      • Gunner's Grange
Cougar Code
« on: June 08, 2002, 07:29:53 PM »
I see lots of Cougar owners here. If anyone is into making their own files, here is something I tried in my AH file and it works.  I wanted to make the film recorder start and stop between each flight.  I start the flight by turning on the engine, so when I start my engine it checks to see if the film recorder is on.  If it is, it will stop and start a new film.  Here is the code:

DEF X3 S2 AND S3                         Rem S2 /I (Film on/off) Flag
DEF X4 X3*                                    Rem Film ON Toggle Flag
DEF X5 S2 NOT S3                         Rem S2 /O (Engine on/off) Flag
DEF X6 X5 AND X4                          Rem Film ON Engine ON Flag

BTN X5 Eng_All                               Rem Engine on/off
BTN X3 Film_Rec                             Rem Film on/off
BTN X6 Film_Rec DLY(60) Film_Rec Rem Turn Film Off then ON

I use the S2 button to start engines, and the shifted S2 to turn on the film.  I needed a NOT in there so the flag would not turn on when I press the S2 with the S3 shift key.   If I do not start the film recorder, or shut it off, it will not start a new film.  

Gunner
Gunner
Cactus Air Force

Offline Karnak

  • Radioactive Member
  • *******
  • Posts: 23047
Cougar Code
« Reply #1 on: June 08, 2002, 07:42:59 PM »
I use these lines for that:

BTN T7   /P CycleEngine
   /R CycleFilm
Petals floating by,
      Drift through my woman's hand,
             As she remembers me-

Offline GunnerCAF

  • Silver Member
  • ****
  • Posts: 946
      • Gunner's Grange
Cougar Code
« Reply #2 on: June 08, 2002, 08:02:04 PM »
Karnak,

That's way too easy!! ... but it does work :)

Gunner
Gunner
Cactus Air Force

Offline GunnerCAF

  • Silver Member
  • ****
  • Posts: 946
      • Gunner's Grange
Hide Cursor
« Reply #3 on: June 15, 2002, 10:02:10 AM »
Here is another handy few lines of code.  If you want to hide your cursor with a press of a button:

USE SCREEN_RESOLUTION (1024,768)
BTN T1 MOUSEXY (DR, 1023, 767)

You need to put in the screen resolution your using and the coordinates would be the same as the resolution.  When you press T1 (or other button of your choice), the cursor moves to the lower right corner.

Gunner
Gunner
Cactus Air Force