BearBearBear Dev Diary – #4
Today and yesterday I managed to sort out:
- calculating the result of the spin
- adding/removing money from the player based of the result of the spin
- updating the money visually
- checking if the player has won or lost
- spawning win/loss text
Not all of this is coded in C++, due to time I put some of this into Blueprints as I know how they work and can work with them quicker. Almost all of BBB is coded in C++ the only times I used Blueprints were for handling the players input and updating the money visually.
Had a few bugs in the code that handled calculating the results which took a bit of time to figure out. One of my problems was that I wasn’t initialising an array correctly so instead of being filled with zeros I had the random data that was last stored in the memory location. And the other was that I hadn’t added breaks to my switch statement so instead of only doing one of the cases it would do all the ones below it as well. These took a while to spot as I’ve not had to deal with those things before in VB or BP they handle those things for you.



