We are currently changing the Bohemia Interactive forum software. This means http://forums.bistudio.com will be 'Read Only' until Friday. Apologies for the inconvenience.

Results 1 to 4 of 4

Thread: Run script when button is pressed in OFP

  1. #1

    Run script when button is pressed in OFP

    hi all. I searched for this script, but nothing found. Of course, I found it only for arma. in OFP it doesn't works. But I have seen in one mission, that if you press keyboard button - 9, script will start. How I can do this? please help me... Here is this script. I dont know how it works:

    _O = call loadfile ":input agetkey 9"
    _u = call loadfile ":input agetkey 8"
    _y = call loadfile ":input agetkey 7"
    ?_o==1:[] exec "save\save.sqs"
    ?_u==1:[] exec "player\Pers.sqs"
    ?_y==1:[] exec "player\Mission.sqs"
    goto "start"

  2. #2
    Not sure what you are trying to do, but would using a radio trigger work for this?

    The keys would be 0-0-1 or whatever radio "channel" you set it to.

    Make a trigger, set activation: Radio Alpha(or any of the radio channels).
    condition: this
    In the on activation: [] exec "whatever.sqs".
    Last edited by bondematt; Mar 21 2012 at 04:18.

  3. #3
    Join Date
    Mar 21 2012
    Prostějov, Czech Republic


    I think you just can't get information which key have been pressed in OFP, but there is little modification which allows that, it's FWatch by Kegetys & patched by Faguss.

  4. #4
    hm... ok I try, thanks... but... I needed it for MP, so it is also pointless... but thanks

Similar Threads

  1. Run script when button is pressed.
    By Orion987 in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 5
    Last Post: Mar 10 2013, 18:19
  2. ctrlactivate or how to activate a button/activeText per script
    By Melmarkian in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 3
    Last Post: May 1 2011, 14:01
  3. Toggle run / walk button to avoid RSI injuries
    By Graw2Pro in forum ARMA 2 & OA - GENERAL
    Replies: 9
    Last Post: Jan 4 2010, 01:21
  4. make a script to pause when space is pressed?
    By lonck in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 0
    Last Post: Nov 1 2009, 22:19
  5. Who pressed what...?
    By Gidcon in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 0
    Last Post: Sep 28 2002, 11:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts