MVP 01: Button
Introduction
I was slightly worried about programming my button to move, but thanks to the video playlist I was able to get the groundwork for how my button(s) will operate. I also did my work in the game lab when Storm had his office hours, so I was able to double-check with him on any issues I was having.
The Button
Before going into what went well/bad while programming my button and what I feel like I know, I thought it is important to get what my button actually does at this moment. As for the design, I make the same thing as the videos but on the wall. I figured it was better to program the button and worry about the look of it later. Since it is on the wall, instead of walking on the button, I have it so the player has to press "e" to turn the button on. To avoid being able to press the button from anywhere, I have it so the player has to be in the collision box to take the input, and when they leave, the button stops taking input.
Something that went faster than I expected was making the button only pressable when in the collision box. When I first coded the button to start the animation, I quickly realized that you didn't have to be looking at or be anywhere near the button to activate it. The solution was much easier than I expected since I just had to add On Component Begin/End Overlap for the collision box and enable/disable input respectively.
![]() |
| Enable Input Program |
As for something that went slower than expected, despite using the almost exact method as the video, actually making the button move and changing the color took slightly longer than I thought. I think one thing that delayed this was due to the fact that when I first made the animation to depress the button and change color, I was finding that it wasn't changing the color when finished with the animation. I had found out shortly after that the button was changing color but it was doing so much later than intended. I was then able to go into the animation and found that the total time was 5 seconds, despite it finishing it in 1, and was able to fix the problem quickly.
![]() |
| Button Press Program |
Something that was a little confusing to me was the interactions between the button and the door. While I didn't really put anything in to make the door move yet, nor have I done as much investigating on it, I seemed to be missing one part that would not let me connect them.
While I would like to say I understand the things I did so far a lot, I'm sure most of the things will escape my memory after a short while of not doing it. Like Heagney said in class, it takes multiple tries to really hammer these into memory. Something that was pretty easy, however, was making the materials for the button. It was probably the easiest thing I've done so far and the process was relatively simple.




Comments
Post a Comment