Jump to content
Sign in to follow this  
jts_2009

Run script when button is pressed in OFP

Recommended Posts

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"

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×