0 index strikes again by Whitaker
Hello again, and welcome back to another adventure of me spending hours making simple mistakes. As we all know, or should know, code loves to start counting at zero! arrays start at zero, lists start at zero, even out player controllers start at zero! Needless to say, I thought we had set up our paths to start at zero. The biggest issue was that the paths are not actually an array, so I would not even get errors when I was looking for path "0."
This all came about as I was making a new event tile that would transport the player to a random location on the board. However, the player would get sent to one location visually, however, they would receive the gems of another tile type. Then, come next round, they would be at the "correct" location. None of it was adding up!
Turns out I was looking for paths 0-4 instead of paths 1-5, but I was setting the location visually of paths 1-5. This was the core issue in my mix up of location and Tile checking logic. Upon correcting my logic to only get a random int between 1-5 instead I was able to visually put the player at the same location the code thought it was at. Such a simple issue to cause so many problems.
Get Party Panic!
Party Panic!
Race against your friends for the treasure in this 4-player party board game!
Status | Released |
Author | ctrl.alt.defeat.team |
Genre | Adventure |
Tags | Board Game, minigames, Multiplayer, party-game |
Languages | English |
More posts
- Game Over! Continue?Jun 24, 2023
- Reflecting on the Journey: The Finale of Party Panic's Development... or IS it?Jun 22, 2023
- New UI, same old usJun 17, 2023
- Animating A Mesh Without a Skeleton by WhitakerJun 16, 2023
- Animating Text in a Widget By WhitakerJun 16, 2023
- Final Stages and Future Prospects: Party Panic DevlogJun 15, 2023
- The Volcano is active!Jun 10, 2023
- Devlog: Conquering the Challenges in 'Crash'em Karts' - New Kart Racing Mini-gam...Jun 09, 2023
- Camera Angles and using new CamerasJun 08, 2023
- Party Panic! Devlog: Navigating through Challenges and Revving Up for a New Mini...Jun 02, 2023
Leave a comment
Log in with itch.io to leave a comment.