Author Topic: control Prepar3d instrument bug with spadnext + voiceattack  (Read 858 times)

Pannam

  • Newbie
  • *
  • Posts: 14
control Prepar3d instrument bug with spadnext + voiceattack
« on: November 13, 2020, 03:17:56 AM »
Here is what I have done so far,
installed spadnext and voiceattack + the plugin required to communicate between them.
from spadnext I found out the Lvar I need to change. The name is ATR42_NEEDLE_ASI_BUG check attached image va1 & 2 its value is 70,  I want to read it from Voice attack and change it to 170. so, I then use the command to Execute an External Plugin Function check attached image va3 to get the value and then use set a decimal value to enter the value 170 check attached image va4. However, nothing happens this is the result of the main window check attached image va5 . I don't get any errors, can someone help me what am I missing here ? Is there a way I can print or call out what values I have got from spadnext?

I am following this tutorial https://www.spadnext.com/wiki/manual:gameplugins:voiceattack#spadnext_voiceattack_plugin

EDIT: FINALLY I AM ABLE TO GET THE VALUE , NOW I NEED TO SET THE VALUES
I used this function Write a value to the event log
Value: {DEC:LVAR!ATR42_NEEDLE_ASI_BUG}
all that remains is to set the value
« Last Edit: November 13, 2020, 07:32:25 AM by Pannam »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: control Prepar3d instrument bug with spadnext + voiceattack
« Reply #1 on: November 13, 2020, 07:35:20 AM »
If you want to set a value, you'll want to use the "SetValue" context after setting the variable value.

All "GetValue" does is set a given VoiceAttack variable to an ingame value. Modifying that VoiceAttack variable will not affect the ingame value unless you instruct the plugin to use that variable with the "SetValue" context.


Getting the value of the VoiceAttack variable (after it is retrieved from the game by the plugin) can be done with the token appropriate for that variable type, as with any VoiceAttack variable (Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer; Tokens are listed in the "Text (and Text-To-Speech) Tokens" section).

Pannam

  • Newbie
  • *
  • Posts: 14
Re: control Prepar3d instrument bug with spadnext + voiceattack
« Reply #2 on: November 13, 2020, 08:13:03 AM »
If you want to set a value, you'll want to use the "SetValue" context after setting the variable value.

All "GetValue" does is set a given VoiceAttack variable to an ingame value. Modifying that VoiceAttack variable will not affect the ingame value unless you instruct the plugin to use that variable with the "SetValue" context.


Getting the value of the VoiceAttack variable (after it is retrieved from the game by the plugin) can be done with the token appropriate for that variable type, as with any VoiceAttack variable (Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer; Tokens are listed in the "Text (and Text-To-Speech) Tokens" section).

Got it! works fine now, After I get the values is it possible to change the decimal value from user voice input? I am using  VR.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: control Prepar3d instrument bug with spadnext + voiceattack
« Reply #3 on: November 13, 2020, 08:21:41 AM »
Yes...you can use a spoken command, or a "Wait For Spoken Response" action inside a command, to speak a number, and use a combination of the "{CMD}" or "{CMDSEGMENT:}" token and the "{TXTNUM:}" token (in case of a spoken command), or the "{TXT:}" token (in case of the "Wait For Spoken Response" action) in the "Convert Text/Token" field of the "Set a Decimal Value" action.

You can use dynamic command sections (information on those and other features can be found in the documentation) to automatically generate phrases for a range of possible numbers.

However, make sure to limit the amount of possible values to those you anticipate actually using; Numbers in command phrases can quickly generate a large amount of variations, which will affect profile loading times (in extreme cases up to the point of running out of memory).