Forum Discussion

TroyWestphal's avatar
TroyWestphal
Community Member
9 months ago

Variable Help

I have created a roulette game for an activity. I have two variables that determine if the participant has selected Red or Black as their wager spot. The  wager on the Black spot works, the Red does not. When I wager Red and the spin is not red, the variable RedWin is changed to true.

Is there a way to watch as the triggers are executed to see why it is changed to true? 

I attached the most recent file.

Any thoughts are appreciated.

  • If you have set up a reference, you can see when and to what they are changed. Following the logic is the best way to see why.

  • That's a doozy of a file. :)

    I took a real quick peek at it. The first thing I'd do, is make your production more efficient which will get rid of a ton of triggers and also possibly make programming with variables easier

    • get rid of the set objects to hidden triggers when timeline starts. Instead, set the initial state of the object to hidden.
    • It seems you can make the selection of the objects a lot easier. The object has a selected state and a win state (based on where the dial lands). 

    Here's a tutorial that walks through some ideas.

    • TroyWestphal's avatar
      TroyWestphal
      Community Member

      Thank you for the ideas Tom. I am cleaning out some of the extra triggers because I changed paths multiple times and added triggers to get the path to work. 

  • What you have is pretty impressive work.

    There are a couple of things I noticed.

    I didn't look at Toms tutorial, but I'm sure it mentions that if you make all the table hotspots into a button set, you can do without the majority of your triggers. Make a button set, and use Normal and Selected state, and only one of them can be active at a time.

    I couldn't get the Spin button to work with this trigger:

     

    When I changed Bet to PointsBet, it worked:

     

    I'm sending my troubleshooting changes. Somehow, the system is considering the hidden state of Spin Red to be Normal when the slide starts. Don't know how or why, but I suspect some sort of corruption. Maybe duplicating the Spin Black oval will fix it.

     

     

  • TroyWestphal's avatar
    TroyWestphal
    Community Member

    Thank you everyone for your ideas and thoughts. It looks like it was one of the objects that was having an issue. I replaced them and reconnected to the triggers and it is now working.

    Have a great rest of the week and keep innovating.