OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Spence69 on 18 Jun 2003, 12:13:16

Title: Tracking a key
Post by: Spence69 on 18 Jun 2003, 12:13:16
Is it possible to put into a script a line that tracks for a press of a key

for example it might look some thing like

?(pressed t):goto "start"

Title: Re:Tracking a key
Post by: Burn on 18 Jun 2003, 14:01:13
Hi Spence69 :wave:â€Â¦ And, no I don't think so :-\â€Â¦ The only way you could do that is by adding a action to your player. I don't think it is possible to assign a certain Key to activate a script :-\â€Â¦ But what the hell do I know, I'm no scripting Guru ::) :P ;Dâ€Â¦
Aaanyways :Pâ€Â¦ here's the correct syntax for addAction:

player addAction ["name","script.sqs"]

This will add a new action to the player's Action menu. "name" is the text to be displayed for the action. When the action is selected from the menu, the script named "script.sqs" will start.

Hope that helped ;)
 :joystick:
Title: Re:Tracking a key
Post by: LCD on 18 Jun 2003, 15:57:43
no way 2 assign actions 2 keys

LCD OUT