VoiceAttack
General => How Do I? => Topic started by: HardyHero on January 15, 2017, 06:34:36 AM
-
Imagine this situation:
Joystick button A = fire weapons
Keyboard key "V" = fire weapons
Voice command "fire" = fire weapons
If I say "fire" voice attack will use the command "V" to send to the game this key press.
But in game, the joystick button A and the key "V" are configured to fire.
This mean if I press these buttons my plane will fire.
But VoiceAttack also will detect this keys, so the hardware will fire and VoiceAttac will fire.
How can avoid this?
I want to detect if commands came from joystick/keyboard, VoiceAttack will give a audio feedback but will not fire.
If commands came from my voice, VoiceAttack will give a audio feedback and will fire.
-
{CMDACTION} - The method by which the current command was executed.
The possible results are, 'Spoken', 'Keyboard', 'Joystick', 'Mouse', 'Profile', 'External', 'Unrecognized' and 'Other'.
The value will be, 'Spoken' if the command was executed by a spoken phrase, 'Keyboard' if the command was executed using a keyboard shortcut, 'Joystick' if executed by a joystick button, 'Mouse' if executed by a mouse button click and 'Profile' if the command was executed on profile load (from the command indicated in the profile options screen).
The value will be 'External' if the command is executed from a command line.
'Unrecognized' will be the value if the command was executed using the unrecognized phrase catch-all command in the profile options screen.
'Other' is reserved.
If the sound always plays, you don't have to include a check for it, only the keypress:
Play sound, '{VA_SOUNDS}\fireweapons.wav'
Begin Text Compare : [{CMDACTION}] Equals 'Spoken'
Press V key and hold for 0,06 seconds and release
End Condition
-
Perfect!
I didnt know the CMDACTION method.
I will check more about the list of supported methods.
Thank you veyr much! ;D
-
Also, do you know if is possible to {LASTSPOKENCMD} detects more than one word by time?
I mean... Put a list of word and {LASTSPOKENCMD} detects if I said any of these words.
-
Also, do you know if is possible to {LASTSPOKENCMD} detects more than one word by time?
That token will always contain the last recognized spoken command phrase(Not commands triggered by any other method), and only that. So no.
-
oh :-\
And about AND / OR / NOR? I didnt find anithing... I'd like to use at least the "OR" to avoid create multiple commands...
-
And about AND / OR / NOR?
Search the documentation for "{EXP:expression}". It's a highly versatile token, and allows evaluating multiple statements/expressions in one conditional block:
Begin Text Compare : [{EXP: '{TXT:Input}' LIKE 'One' Or '{TXT:Input}' LIKE 'Two'}] Equals '1'
End Condition
-
Perfect! Thank you very much!