cmdrmcdonald / EliteDangerousDataProvider

Apache License 2.0
134 stars 31 forks source link

Setstate issue with VA ? #261

Closed Pryss closed 7 years ago

Pryss commented 7 years ago

Hello,

On my way to enhance the interaction between VA and EDDI in my Elite personnality, I'm currently stuck with the "setstate" command in VA.

I'm trying to transfert a Boolean variable called "infoautosys" from VA to EDDI.

I'have read the wiki page concerning VA, and it seems not to work. Or, more realisticly, I do not understand clearly what to do...

In VA :

Set Boolean [Infoautosys] to False
Set Text [State variable] to 'Infoautosys'
Execute external plugin, 'EDDI 2.3.0' -> (Plugin Context set to "setstate"  and Text Variables set to "State variable")
Set Text [script] to 'Testvariable'
Execute external plugin, 'EDDI 2.3.0' -> (Plugin Context set to "speech"  and Text Variables set to "script")

In EDDI : I try to check the value of infoautosys with this script :

{(infoautosys)}
{(state.infoautosys)}

{P(infoautosys)}
{P(state.infoautosys)}

And it seems that "infoautosys" is not set...

I guess that I've missed something, but I juste made like the Wiki says (Or not ?).

Darkcyde13 commented 7 years ago

You have it mostly correct. The wiki is a little outdated, because I have found you don't need to set the variable when you execute the plugin anymore, just setting the context is enough.

However, your problem is because you have set it to False, so nothing is spoken! Try setting it to True and test again. ;) I just tried this as you have it (without setting the variable in the 'execute external command') and it works perfectly.

To get a raw value spoken, use: {dump(state.infoautosys)} This will tell you when a value is 'Not set' (void) or if it is 'False', 'True', or any other set variable type.

Also, if you just need a variable to be spoken, you do not need the parentheses (), just the {} is ok. {state.infoautosys}

Hope that helps! :)

Pryss commented 7 years ago

Many Thanks. It works.

Tkael commented 7 years ago

@Pryss Let's keep the issues list to just issues that are unresolved. If this issue is resolved, would you mind closing the issue?