Day 34

Today at the beginning of the class I worked on making the movement be continuous when moving to the next room. Before when i went into a new room my player would stop moving and I would have to press the move key again. I used keyboard_check_direct(); instead of keyboard_check(); and it worked, i got continuous movement when moving to the next level.

Like this

Then after that I worked on making a pause menu for my game. I made a controller object (which is an object that has no sprite but does something), made it persistent so I only have to put it in one room and it's always persistent, then i made the code:

Create Event:

Step Event:

Draw Event:

In the create event i made the variable called "pause" and i set it to 0 (false), then in the step event i made the code that activates the pause menu (if i press the escape button pause the game) using the step event is best because it's the fastest event, it's always run continuously. Then in the draw event i draw the pause menu and what shows when pause is active.

This is the pause screen for now

Tomorrow i will work on making my sprites or something else.

No comments:

Post a Comment