1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. #GiveAwayFriday. Win a copy of F1 2017 - The Game. Click here to join.

Killing the Engine via Qscript

Discussion in 'Racer Physics and Technical' started by ZkidMarkZ, Jul 20, 2013.

  1. ZkidMarkZ

    ZkidMarkZ

    Messages:
    50
    Ratings:
    +3
    Hi,
    I'm new to scripting, but I was thinking about making a Qscript that would kill the engine when a button is pressed (say 'K')
    Which int corresponds to which letter in:
    Code:
    is key <int> pressed
    I'm hoping to use something like this (I'm aware of how ugly this code is..):
    Code:
    for 'eternity'
    {
      is key K pressed
      {
          send stop engine to console
      }
    }
    Could anyone please guide me in the right direction?
    Thx in advance!
     
  2. ZkidMarkZ

    ZkidMarkZ

    Messages:
    50
    Ratings:
    +3
  3. Mr Whippy

    Mr Whippy

    Messages:
    2,989
    Ratings:
    +461
    Just make the S key a toggle for engine start/engine stop.

    Racer used to do this, if the engine was running S would shut it off, or was it shift s?

    I can't remember but it's best as a toggle I think...?!

    Hmmm

    Dave
     
  4. ZkidMarkZ

    ZkidMarkZ

    Messages:
    50
    Ratings:
    +3
    But where do I find that? been looking through the controls..
     
  5. Alexander Knoll

    Alexander Knoll
    NEVER GIVE UP!!

    Messages:
    1,417
    Ratings:
    +286
    i found the script....
    here: klick
     
    • Like Like x 1
  6. ZkidMarkZ

    ZkidMarkZ

    Messages:
    50
    Ratings:
    +3
    Golden! Thanks
     
  7. ZkidMarkZ

    ZkidMarkZ

    Messages:
    50
    Ratings:
    +3
    Been trying to get the script to work, but without success.
    • I've recompiled the script just in case..
    • racer.ini says that scripts are autoloaded
    • I have tried 'reload scripts'
    • I've changed my keyboard layout to English
    • Tried with Alt+088
    I have no ideas left.. I guess that you don't need a loop in the rsx-file? It acts like a trigger?
     
  8. Alexander Knoll

    Alexander Knoll
    NEVER GIVE UP!!

    Messages:
    1,417
    Ratings:
    +286
    sry i have no plan about scripts...maybe one of the wzards can help you? stereo, dave, skybh?