great!! one question though, whats the code? i wanted to use this in a game (if its ok, credit will be given) and i don't know what the code for the menu choice object is. how would i change it if the room name for the first level is different?
Thanks, glad you like it
No credit necessary; the concepts in this tutorial are pretty basic.
As for the code, it comes in two parts. One handles the Draw event, the other handles the room-changing.
The Draw event one is a bit too long to explain in this post; check "Part Three-- Rollover Text" in the tutorial for that. However, I can explain the room-changing.
Very cheap (but efficient) method used. There's something in each instance that executes its own code that you can specify when it's created, called the Instance Creation Code (go into the room editor, Ctrl+right click an instance, and click Instance Creation Code at the bottom). There, I set some variables, named code
is a string of text that tells the program what to do when clicked on. It is executed in the Mouse Left Released event, with the code:
So each button will do something different when the Mouse Left Released event is activated, based on the Instance Creation Code for that instance. The Instance Creation Codes are things like room_goto(rm_play);
As for the text
variable, it just stands for what each button should be labeled as. It's a string, and the text is actually drawn in the Draw Event. Through Instance Creation Codes, you can have one object do different things easily.
Hope this helps
And for the room name, use room_goto(room name);
, replacing "room name" with the name of your room.