Editors Depot - Mission Editing and Scripting > OFP - Editing/Scripting Multiplayer

[Question]Making a bind key to a known script

(1/3) > >>

MadBafla:
Hi
What I'm asking is if there's an option in OFP to bind a key to make a script (such as saying "reloading" while I am reloading etc.)

If there is one, which I missed in the tutorials, I'd like to get a link to an example of it

Thanks in advance
MadBafla

Lone~Wolf:
Yes, yes there is a way.

If you can find fWatch, that allows you to monitor keypresses. If you install fWatch, then make the following script:


--- Code: ---#LOOP
_x = 0
~1
_x = call loadfile ":input getkey X"
? _x = 1 : [parameters] exec "thescript.sqs"
goto "LOOP"

--- End code ---

Run the script for the player.

When the player presses the 'X' key, it will execute the script. Change X to whatever you want.

Tell me if that works!

MadBafla:
First of all I would like to apologize if I'm wrong because I'm pretty noob on all of the coding stuff :P

Now, if I understand you correctly, the loop you gave me was for editing a script in a mission and such.
What I want, is like a "keybind" that executes that same sqs file (or any other for instance) that will operate it for my user on any multiplayer server.

The point is like to use F1-F12 to known automatic messages that will show up on radio such as need ammo or for example that when I'll press "R" my squadron will get a "Reloading.." message etc.

Is that possible?
Once again, if I misunderstood, if you could be more specific where I put the files and how to use it I'd like that (The radio messages are scripted already from noob understanding technique so need to help with that :-[ )

Thanks again
MadBafla

RKurtzDmitriyev:
I'm afraid I've never used fWatch, but


--- Quote from: MadBafla on 05 Jun 2010, 02:07:58 ---Now, if I understand you correctly, the loop you gave me was for editing a script in a mission and such.

What I want, is like a "keybind" that executes that same sqs file (or any other for instance) that will operate it for my user on any multiplayer server.
--- End quote ---

You mean you want special features added to OFP for use in multiplayer missions not designed by you? I don't wish to patronize you, but I must point out that that might be considered cheating, depending on context. :confused:


--- Quote ---The point is like to use F1-F12 to known automatic messages that will show up on radio such as need ammo or for example that when I'll press "R" my squadron will get a "Reloading.." message etc.
--- End quote ---

Well, I'll just assume that you want to do this in a co-op mission, or in a PvP where everyone has this advantage. ;)

So you definitely need this to happen without building or modifying the mission yourself? If so, I'm afraid I can't help you due to my lack of knowledge regarding fWatch. Others may know, though.

But if you build the mission yourself, then I think I know a way to get what you're looking for.

MadBafla:

--- Quote from: RKurtzDmitriyev on 05 Jun 2010, 05:07:01 ---You mean you want special features added to OFP for use in multiplayer missions not designed by you? I don't wish to patronize you, but I must point out that that might be considered cheating, depending on context. :confused:
--- End quote ---
Well you're not the 1st I've heard calling what I want to do a cheat, though I have to say that I do not understand why.

I have seen a lot of games that has this function and I encountered enough players with functions very similar to what I'm asking for WITHOUT being called or accused as cheaters.
In my opinion btw, This function could amplify the game experience by much, especially in co-op missions.

But to the point:
Yes.. I am asking for a way to do that without tampering with the missions myself (that will be cheating, wont it?) and I am not thinking about making my own mission because my knowledge in scripting etc. is very low.

I have downloaded fWatch but had trouble installing it cause it hasn't got an .exe file in it (I think I downloaded source idk where to get install file and how to operate it)
If others do know how to operate this program I'd be glad to learn.. I've searched for the tutorial's section and found no recollection of this program

Hope someone can help me
MadBafla :good:

Navigation

[0] Message Index

[#] Next page

Go to full version