Author Topic: [Solved] Can't progress image state system  (Read 969 times)

Code: [Select]
  // Initial start up state
stateName[0]                     = "Activate";
stateTimeoutValue[0]             = 0.5;
stateTransitionOnTimeout[0]      = "Ready";

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "Linecheck";
stateAllowImageChange[1]         = true;

stateName[2] = "Linecheck";
stateScript[2]                  = "onLinecheck";
stateAllowImageChange[2]        = false;
stateTransitionOnNotLoaded[2] = "Lineout";
stateTransitionOnNoAmmo[2] = "Linein";

stateName[3]                    = "Lineout";
stateTransitionOnTimeout[3]     = "Ready";
stateTimeoutValue[3]            = 0.1;
// stateFire[3]                    = true;
stateAllowImageChange[3]        = true;
stateSequence[3]                = "bobGone";

stateName[4]                    = "Linein";
stateTransitionOnTimeout[4]     = "Ready";
stateTimeoutValue[4]            = 0.1;
stateAllowImageChange[4]        = true;
stateSequence[4]                = "root";
Code: ("trace") [Select]
Entering [Item_Beer]Armor::onTrigger(38, 26264, 0, 1)
   Entering [mailMenu]Armor::onTrigger(38, 26264, 0, 1)
      Entering [AchievementsMenu]Armor::onTrigger(38, 26264, 0, 1)
         Entering [groupBannerCycling]Armor::onTrigger(38, 26264, 0, 1)
            Entering [WizardCycleWandSpells]Armor::onTrigger(38, 26264, 0, 1)
               Entering [RangerCycleArrows]Armor::onTrigger(38, 26264, 0, 1)
                  Entering [RM_Binds]Armor::onTrigger(38, 26264, 0, 1)
                     Entering [WizardCycleElements]Armor::onTrigger(38, 26264, 0, 1)
                        Entering [HatMod_Package]Armor::onTrigger(38, 26264, 0, 1)
                           Entering [peggsteps]Armor::onTrigger(38, 26264, 0, 1)
                              Entering Armor::onTrigger(38, 26264, 0, 1)
                              Leaving Armor::onTrigger() - return 26264
                           Leaving [peggsteps]Armor::onTrigger() - return 26264
                        Leaving [HatMod_Package]Armor::onTrigger() - return 26264
                     Leaving [WizardCycleElements]Armor::onTrigger() - return 26264
                  Leaving [RM_Binds]Armor::onTrigger() - return 26264
               Leaving [RangerCycleArrows]Armor::onTrigger() - return 26264
            Leaving [WizardCycleWandSpells]Armor::onTrigger() - return 26264
         Leaving [groupBannerCycling]Armor::onTrigger() - return 26264
      Leaving [AchievementsMenu]Armor::onTrigger() - return 26264
   Leaving [mailMenu]Armor::onTrigger() - return 26264
Leaving [Item_Beer]Armor::onTrigger() - return 26264

Code: [Select]
function fishingRodImage::onLinecheck(%this, %obj, %slot)
{
   echo("entered Linecheck");
}
I never receive the echo and I never seem to get out of the "Ready" state. I'm totally baffled by it
« Last Edit: June 14, 2016, 12:44:42 AM by Jervan »

StateTransitionOnNotLoaded?? never seen that before

check if the item is executing with any errors in the console, and replace that statetransition with a valid state command. Sometime that kind of mistake will not echo any errors in console but cause problems with image state transitions

Loaded, Ammo, notLoaded, noAmmo are all valid transitions :(
No errors on exec, I'm just trial and erroring it now to try and get it to work.

Edit: I think it might be that two things are going to the same state, albeit different paths. I'll change and see if it helps.
« Last Edit: June 14, 2016, 12:33:50 AM by Jervan »

Yep, got it working by changing the pathing. Weird.

wait so whats the difference between loaded/ammo and notloaded/noammo?

wait so whats the difference between loaded/ammo and notloaded/noammo?
%pl.setImageAmmo(%slot,%bool);
%pl.setImageLoaded(%slot,%bool);

stateTransitionOnAmmo/stateTransitionOnNoAmmo
stateTransitionOnLoaded/stateTransitionOnNotLoaded

allows you to pause on a state and have a two way gate that is controlled outside of the state system