Forum Discussion

OrganizationSta's avatar
OrganizationSta
Community Member
3 years ago

States Not Switching Properly

Hi everyone,

I am working on a clinic simulation and as part of it need to show how many people are in the waiting room. To do that, i made a row of 5 patient icons and, using state changes, i want as many patient icons to show up as there are patients in the waiting room. 

The icons i used for the patients came in two parts: the head and the body, so I had to do the states for each half. 

For some strange reason, i can accomplish this for the heads (they accurately reflect the patient count), but the bodies always show unless the patientcount variable is set to zero, then none show. 

I've tried it two different ways: 

  1. Version 1: I made the shapes in the normal state see-through and made a show state. Then I set the triggers to switch the state from normal to show if the patientcount variable is equal to or greater than 1, 2, 3, etc. 
  2. Version 2: The normal state is the patient showing but I set the default state to hidden. I then set the triggers to switch the state to normal when the patientcount variable is equal to or greater than 1, 2, 3, etc. 

I've been at this all day and am about to tear my hair out. Could someone please have a look at the story file for me and see where I am messing it up? Thank you so much! :) 

Note: I haven't automated the patientcount variable yet; to test it you still have to manually change the trigger to set it to a number. 

    • OrganizationSta's avatar
      OrganizationSta
      Community Member

      Hi Phil, 

      thanks for the help and super fast, too! :) 

      So, you did it with a new layer... I hadn't thought of that. This is going to be a rather intricate game, so I am hoping to avoid layers to make it easier for me to find what's what, but I've tried to emulate what you did with setting the states to hidden when the timeline starts and i just can't get it to work except with the use of layers. Why is that?

      And why is it necessary to set the states for the heads and bodies to hidden at the start of the timeline if the default state is already set to hidden? Shouldn't Articulate hide the object if the default state is hidden? It doesn't seem to do that consistently - it does for the heads but not the bodies for some reason.

      I have other counters in this game, and those set properly with a trigger for the variable change which happens when the timeline starts (not in the test i uploaded, i took them out for simplicity). The only one that's not doing it properly is this one but i can't figure out what the issue is. 

      • PhilMayor's avatar
        PhilMayor
        Super Hero

        I put it on a layer as if I am building games it allows me to reduce the triggers on the base layer and use the layer as a way to call functions.

        I set them to hidden initially with triggers as each time the variable changes it recalculates I didn’t know if your number would go up or down.

        You could add to the base layer and should add. Your initial setup looked right to me it just didn’t work.

        Sent from my iPhone

  • Hi Phil, 

    i spent the last few days working on this and have adopted your setup for the layer to house all the counters; it's actually great, thanks for showing me that! :) 

    • PhilMayor's avatar
      PhilMayor
      Super Hero

      Thanks for the update, glad it helped.

      Sent from my iPhone