Since this is one of the top hits when you google 'on my mark' & voice attack, I thought I'd put my formula for making a generalized, universal 'On my mark' command here, with a 15 second timeout.
What it does: Say any existing command followed by 'On my mark,' and the command will wait until you've said 'Mark/Execute/Now/Engage/Punch it' 15 seconds before firing that specific command (if it exists).
CAVEATS: This doesn't work as well with single-worded commands (eg: 'map on my mark'). More often, it will fire both commands. This also only sets up for {CMD} On My Mark, and not On My Mark {CMD}. You definitely want to make sure your speech recognition is on point.
I was inspired by the HCS VoicePacks, and decided to figure out how to implement this without rewriting dozens of commands in my homegrown pack.
This breaks down in to 3 different commands created in VoiceAttack:
* The 'On my mark' with a wildcard trap
* The 'Mark' command that will trip when you say 'Mark'
* A timer command, to prevent the first from being stuck in a loop for too long.
Below is the code for each, along with a run down of the steps on how to do the fancy stuff.
When I Say: *On my mark
Set Boolean [mark] to False
Set Boolean [timeout] to False
Execute Command 'MarkTimer'
Execute Command 'Acknowledge'
Start Loop While: [mark] Does Not Equal True AND [timeout] Does Not Equal True
End Loop
Begin Condition: [mark] Equals True AND [timeout] Does Not Equal False
Execute Command, '{CMD_BEFORE}' (by name)
End Condition
For the While Loop and If Statement, you'll want to select them by looking for their Compound Condition Builder, respectively.
For the Execute Command, this will give you a warning (which you should read) when inputing {CMD_BEFORE} into the text field & saving.
Pay attention to the 'When I Say' field. If you want 'On My Mark' to come BEFORE the command, then use On my mark* with {CMD_AFTER}
When I Say: [Mark;Execute;Now;Engage;Punch it]
Set Boolean [mark] to True
Easy peasy.
MarkTimer (voice disabled)
Set small int (condition) [markTimer] value to 15
Start Loop While: [markTimer] Is Greater Than Or Equal To 0 AND [mark] Equals False
Pause 1 Second
Set Small Int (condition) [markTimer] value as decremented by 1
End Loop
Begin Condition: [markTimer] Is Less Than Or Equal To 0 AND [mark] Equals False
Set Boolean [timeout] to True
Execute Command, 'Error'
End Condition
Again; use the Compound Condition Builder for the While and Conditional pieces.
Hopefully this helps any others that come across this post, and if anyone has any pointers or obvious pitfalls with this method, let me know!