Hello Everyone!
This is my first post so if it is in the wrong forum I apologize. I have also searched Google and these forums for an answer to my question but couldn’t find anything hence this post.
Ok, so, we are using Panda3D in my video game design class and we are working on a simple FPS. In the level we are designing we have to have a couple “hotspots” that trigger a quiz or a puzzle the player must solve in order to progress through the level. One of my ideas is to implement a chess puzzle an example of which can be found here:
The basic idea is to display a chess board to the user and have them choose the spot where the player should move (the player doesn’t have to choose the actual chess piece to move, just make a guess as to which space should be used)
I want to implement it using the DirectGUI specifically have a chessboard made out of 64 DirectButtons with pictures on them to represent the pieces and the colored squares on the board. I know how to set this all up but here is where I am having trouble:
Is there a way to assign a value to each of the buttons so I can tell which button was pressed? Basically I want to be able to tell which button was pressed and compare it to the solution I have for the puzzle. I know you can assign a function to the button that runs after the button press, but I really need keep track of which button the player chose. If anyone could point me in the right direction I would be very grateful.