Author Topic: Script output to VCE variable?  (Read 601 times)

Trying to output an RTB Pref to a VCE variable so it can be displayed via BrickText: how do I do this?

For example, $Example::OutputMe = 1; outputted to <var:minigame:outputted>.
« Last Edit: March 11, 2013, 01:53:05 AM by Randomness »

Code: [Select]
for(%i = 1;%i < 6;%i++)
{
registerSpecialVar(GameConnection,"ceparam" @ %i,"%this.param" @ %i);
}
I found that in the command events add-on and it works so I'm gonna use that as source

Code: [Select]
registerSpecialVar(Minigame,"outputted","%this.outputted");
When you set minigame.outputted to something, you can capture it with <var:minigame:outputted>

And $Example::OutputMe? How does that get to outputted?

Try this:
Code: [Select]
registerSpecialVar(Minigame,"outputted","$example::outputme");

Code: [Select]
Add-Ons/Event_Variables/server/groups.cs (49): Unable to find object '-1' attempting to call function 'getClassName' BackTrace ->[VCE_Main]GameConnection::ChatMessage->filterVariableString->VariableGroup::getVariable

Don't use a global variable then

Don't use a global variable then

I try setting %this.setme = $Example::OutputMe before registering the variable, but I get the same result, its still -1.

I try setting %this.setme = $Example::OutputMe before registering the variable, but I get the same result, its still -1.
Wait
Are you telling me that you are registering the vriable morethan once

Wait
Are you telling me that you are registering the vriable morethan once

Uh.. stuff. I guess Im not supposed to do that more than once.

It only registers it once now, but I still get the same thing.

Code: [Select]
Add-Ons/Event_Variables/server/groups.cs (49): Unable to find object '-1' attempting to call function 'getClassName' BackTrace ->[VCE_Main]GameConnection::ChatMessage->filterVariableString->VariableGroup::getVariable
All I want to do is make it displayed as BrickText for a certain brick. Why is this so unnecessarily hard.
« Last Edit: March 11, 2013, 08:10:35 PM by Randomness »