Creating an Event
Before we can add the code to run the event, we need its guts!
Select where you want your button to be, and make a new event by pressing enter or re-clicking and hit “New Event…”.
Set a graphic from the Switch-04 or your file. I’ll choose the first column as it fits with the gra*sland palette.
Finally, for this section, uncheck “Move Animation” and set the trigger to “Player Touch”.
Coding the Basic Parts
Alright, lets get to the juicy part. Adding some code!
First, make a conditional branch (if statement) and set it for the switch to be on or off. If it selects to off, than make sure the next code goes if true part, if on, than make sure the next code goes to the else part.
Next include a move route for the event. Set it where it changes to the next graphic and waits four frames, and counties that until all frames are done. This one has three next frames so I do this three times.
Afterwards, add a toggle for the switch to be on, so it won’t be trigger again.
Adding Indicators to the Player
Usually, from a game design stand-point, just toggling the switch and showing the animation might not be enough. Maybe for some players, they don’t know they even pressed a button!
Lets add an indicator to tell that its pressed by text. Make a new show text and tell the player in your own words that they press a secret button. I put something generic as, “Something has been triggered!”.
Okay, now lets add a sound effect to go along. I’m choosing “035-Switch04” as it feels like a sound clip for a button press in the campy woods.
The End as We Know It
Play-test the game and make sure it works.
Hope you’ve been educated on the art of “super secret buttons”, haha.
Hope you enjoy the post for RPG Maker XP How to Make a Secret Button, If you think we should update the post or something is wrong please let us know via comment and we will fix it how fast as possible! Thank you and have a great day!
- Check All RPG Maker XP Posts List
Leave a Reply