 |
Palek Wanderer
Joined: 28 Sep 2005 Posts: 55
|
Posted: Wed Aug 26, 2009 8:13 am
3.10 Command Input Trigger issue |
I have a button that calls the following:
Code: |
#VAR NewDroid %selected
#IF (@NewDroid LIKE IF) {
#VAR NewDroidType if
}
#IF (@NewDroid LIKE T5) {
#VAR NewDroidType t5
}
#IF (@NewDroid LIKE GNK) {
#VAR NewdroidType gnk
}
#IF (@NewDroid LIke HKR) {
#VAR NewDroidType hkr
}
#IF (@NewDroid LIKE MD) {
#VAR NewDroidType md
}
#IF (@NewDroid LIKE R2) {
#VAR NewDroidType r2
}
#IF (@NewDroid LIKE C3) {
#VAR NewDroidType c3
}
#IF (@NewDroid LIKE CG) {
#VAR NewDroidType cg
}
#SHOW @NewDroidType Detected
#SHOW {What droid is this?}
#T+ NewDroidConstruct
|
The trigger NewDroidConstruct is disabled looks like this:
Code: |
#VAR NumDroidPlusOne %1
#NOINPUT
#SHOW {Acknowledged - This is droid # @NumdroidPlusOne}
#IF (@NumDroidPlusOne <= @numdroid) {
#SHOW Not Higher
#SHOW {Setting Droid # @NumDroidPlusOne}
#WAIT 1000
#SHOW {Set}
#VAR Droidnum @NumDroidPlusOne
} {
#SHOW Higher
#SHOW {Setting # of Droids to @NumDroidPlusOne}
#var numdroid @NumDroidPlusOne
#WAIT 1000
#SHOW {Set}
#VAR Droidnum @NumDroidPlusOne
}
#var Droid@NumDroidPlusOne.DroidName {@NewDroid}
#var Droid@NumDroidPlusOne.DroidType {@NewDroidType}
#T- NewDroidConstruct
|
Here is the results of this button being pressed:
What droid is this?
Acknowledged - This is droid # 16
Not Higher
Setting Droid # 16
Set
Acknowledged - This is droid # command IF-31N to exit
Higher
Setting # of Droids to command IF-31N to exit
Set
if Detected
What droid is this?
Acknowledged - This is droid # 16
Not Higher
Setting Droid # 16
Set
Acknowledged - This is droid # command IF-31N to exit
Not Higher
Setting Droid # command IF-31N to exit
IF-79Z readies its arsenal of destruction.
Set
It seems to not disable the Trigger like it is supposed to the first time and runs it again, this happens pretty regularly, I have tried to delete the NewDroidConstruct trigger and recreate, I have tried changing what the IF statement tests for, same results, this will fix itself for a short period then start doing this again. It also gives concat errors when trying to run the trigger twice sometimes and there is no concat usage in there at all. I can provide the package for testing if needed.
Thanks,
Jamie |
|
|
 |
Palek Wanderer
Joined: 28 Sep 2005 Posts: 55
|
Posted: Wed Aug 26, 2009 10:49 am |
After further research in the debugger, it appears it was the #wait commands that are causing the issue, once removed it has fired correctly every time.
Sorry for not researching fully.
Thanks,
Jamie |
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Aug 28, 2009 3:34 pm |
You may consider using the #SWITCH command instead of a series of #IF statements.
I'm glad you got it resolved, although I'm not quite sure I understand why the #WAIT commands were there to begin with. |
|
_________________ Asati di tempari! |
|
|
 |
|
|