Jump to content
  • 0

Execute key actions via script


jahangir13

Question

Does anybody know if it is possible to execute a key action via script command?

I mean like pressing a key for e.g. changing the channel user talks in (like side channel,or direct chat...). Key action name for this here is 'NextChannel'. That's just an example.

 

List of actions:

https://community.bistudio.com/wiki/ArmA_2:_CfgDefaultKeysMapping

 

I mean it is possible to execute a users move action, like crouch or run or something but is it also possible to do this with a non-move action?

What I like to achieve is what happens if a user presses ',' or '.' to change a channel. The name of the channel is then shown in the left lower corner of the screen which will fade out again after 1 or 2 seconds.

I want this to happen within a script.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Does anybody know if it is possible to execute a key action via script command?

I mean like pressing a key for e.g. changing the channel user talks in (like side channel,or direct chat...). Key action name for this here is 'NextChannel'. That's just an example.

 

List of actions:

https://community.bistudio.com/wiki/ArmA_2:_CfgDefaultKeysMapping

 

I mean it is possible to execute a users move action, like crouch or run or something but is it also possible to do this with a non-move action?

What I like to achieve is what happens if a user presses ',' or '.' to change a channel. The name of the channel is then shown in the left lower corner of the screen which will fade out again after 1 or 2 seconds.

I want this to happen within a script.

 

Doesn't that happen by default?

Link to comment
Share on other sites

  • 0

?

If you press a key, that happens by default.

 

But what if I want a selfAction command what does this if you execute the selfAction command.

I guess selfAction command is a good example if what I wrote above was not clear: scroll the mouse wheel, select the selfAction command 'change channel' from the list and this changes the channel you are talking in :)

That's what I meant by 'via script'.

 

But I think after everything I've read so far that this is not possible. But who knows...maybe someone already managed something similar with whatever way.

I do not know how BIS does this if a user presses a key. I also don't know how they recognize a double-tap key action by a user. There are so many things which are so unclear and I guess full of bugs too, hehe.

Link to comment
Share on other sites

  • 0

?

If you press a key, that happens by default.

 

But what if I want a selfAction command what does this if you execute the selfAction command.

I guess selfAction command is a good example if what I wrote above was not clear: scroll the mouse wheel, select the selfAction command 'change channel' from the list and this changes the channel you are talking in :)

That's what I meant by 'via script'.

 

But I think after everything I've read so far that this is not possible. But who knows...maybe someone already managed something similar with whatever way.

I do not know how BIS does this if a user presses a key. I also don't know how they recognize a double-tap key action by a user. There are so many things which are so unclear and I guess full of bugs too, hehe.

 

Ahh I see what you mean, similar to the .Activate() function in something like .NET C#.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...