Jump to content

Photo
- - - - -

Run script when button is pressed in OFP


  • Please log in to reply
3 replies to this topic
Thread Starter
jts_2009
jts_2009

    Sergeant

  • Members
  • 146 posts

  • Joined: 08-September 2009

Posted 20 March 2012 - 16:43 #1

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:

#start

_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"
~1
goto "start"


bondematt
bondematt

    Private First Class

  • Members
  • 16 posts

  • Joined: 11-December 2011

Posted 21 March 2012 - 05:14 #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".

Edited by bondematt, 21 March 2012 - 05:18.


hammer_cz
hammer_cz

    Newbie

  • Members
  • 2 posts

  • Joined: 21-March 2012

Posted 21 March 2012 - 10:19 #3

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.

Thread Starter
jts_2009
jts_2009

    Sergeant

  • Members
  • 146 posts

  • Joined: 08-September 2009

Posted 22 March 2012 - 22:00 #4

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