Author Topic: Disabled gamer need help with commands  (Read 1107 times)

VoiceAble556

  • Newbie
  • *
  • Posts: 9
Disabled gamer need help with commands
« on: December 23, 2020, 03:48:47 AM »
Hey guys, I'm a disabled gamer and I recently just started using voice attack, There's a few things I'm trying to do and i'm not really sure how to do it.

I'm currently trying to play a game called Surviving Mars, basically it's a city builder and it requires a lot of manipulation and I physically can't use a keyboard in fact I'm typing with voice recognition.

The main issues I'm having is with zooming in and out, moving the camera and rotating the camera  veiw aswell as moving the camera forward, backwords, left and right. I was wondering if there was a way to say the following, "Zoom in (x distance)" "Zoom out (x distance)" "Rotate left (x times)" "Rotate right (x times)".

If someone would be willing to give me a few examples using some of the things I listed above I would be extremely grateful.

Thank you for your time!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Disabled gamer need help with commands
« Reply #1 on: December 23, 2020, 09:42:25 AM »
This can be done using a For loop (the "Loop Start - Repeat a specified number of times" action), E.G.
Zoom in [1..10]
Code: [Select]
Start Loop : Repeat [{TXTNUM:"{CMD}"}] Times
    Press NumPad Add key and hold for 0,05 seconds and release
End Loop

If you want to be able to say "Zoom in" by itself, without creating an additional command for that, it could look something like
Zoom in [1..10;]
Code: [Select]
Set integer [~repeatCount] value to the converted value of {TXTNUM:"{CMD}"}
Start Loop : Repeat [{INT:~repeatCount:1}] Times
    Press NumPad Add key and hold for 0,1 seconds and release
End Loop

The "Dynamic command sections" subsection of the "Command Screen" section of VoiceAttackHelp.pdf has more information on the syntax used for the command phrases (other VoiceAttack features like the loop actions and tokens are also documented elsewhere in the file); Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer.

These topics may also be of use:
Control flow (If, Else, ElseIf, Loop, Jump) basics
Variables and tokens summed up


I have exported and attached both examples (the first example is modified to "Zoom out" instead, as two commands cannot create the same command phrase) so you can import them.

VoiceAble556

  • Newbie
  • *
  • Posts: 9
Re: Disabled gamer need help with commands
« Reply #2 on: December 23, 2020, 04:05:40 PM »
Hey, thanks for the example I actually made a few of the commands I needed using the second example. I'm not familiar with coding but i understand the example you wrote. I appreciate it!