I have two script commands, the first is called while the user presses a qualifier. I pass that qualifier on to the second script command, by using "command.SetQualifier(data.func.qualifiers)", but the second script commands data.func.qualifiers is "none", I guess this is not the way it should work?
Find two demo commands attached, please call the command QualTest1 while pressing a qualifier and watch the console.
Thanks! o)
///////////////////////////////////////////////////////////////////////////////
function OnInit(data){
data.name = "Command.Generic: QualTest1";
data.default_enable = true;
var cmd = data.AddCommand();
cmd.name = "QualTest1";
cmd.method = "Command_QualTest1";
}
///////////////////////////////////////////////////////////////////////////////
function Command_QualTest1(data) {
DOpus.Output("Qualifiers: " +data.func.qualifiers);
data.func.command.SetQualifiers(data.func.qualifiers);
data.func.command.RunCommand("QualTest2");
}
///////////////////////////////////////////////////////////////////////////////
function OnInit(data){
data.name = "Command.Generic: QualTest2";
data.default_enable = true;
var cmd = data.AddCommand();
cmd.name = "QualTest2";
cmd.method = "Command_QualTest2";
}
///////////////////////////////////////////////////////////////////////////////
function Command_QualTest2(data) {
DOpus.Output("Qualifiers: " +data.func.qualifiers);
}