playMaker

Author Topic: Setting Array Bool doesn't seem to work twice in a row [SOLVED]  (Read 1260 times)

ndever

  • Playmaker Newbie
  • *
  • Posts: 13
Hi,

I'm trying to make a simple dice rolling game where there are different kind of dice to roll with. The user chooses a number of dice and then rolls with those. I use check boxes and an array bool for the job. Everything seems to work fine until I check and uncheck a dice before rolling - the bool for that dice switches form false to true and stays true. I don't have a clue what could go wrong, so if any of you have something that might help it would be very much appreciated!

I've attached a screenshot.

Thanks in advance!
« Last Edit: July 17, 2017, 12:33:20 AM by Alex Chouls »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Setting Array Bool doesn't seem to work twice in a row
« Reply #1 on: July 16, 2017, 12:31:50 PM »
Hi,
Where is your array on index 0 set to false?
maybe there are some things happening @ the same time, or the bool changed is not triggered a 2nd time
You can test this by setting a breakpoint (right click on a state name and select Toggle Breakpoint) this will pause the game and focus that state when it reaches the state.

ndever

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Setting Array Bool doesn't seem to work twice in a row
« Reply #2 on: July 16, 2017, 02:06:02 PM »
Oooohh, I see what I'm doing wrong! Somehow I got the impression that the event would send the bool value as well.. So yeah, there weren't any set off events :)

Thank you so much! I'm uploading the fix, so if someone finds this topic later, maybe it will help.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Setting Array Bool doesn't seem to work twice in a row
« Reply #3 on: July 16, 2017, 09:59:22 PM »
Hi.
Np, i a happy that you found the solution :)
and nice that you posted it also for others :D