Variable Help

Apr 04, 2024

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.

6 Replies
Tom Kuhlmann

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.

Walt Hamilton

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.