Monday, May 29, 2017

Gamemaker Day 50

Today I learned how to make the checkpoint work. what i did: First I create a variable in the create event, "if(global.checkpointR == room)" which mean if the checkpoint is red, then x=global.checkpointx; and y = global.check.point. next thing I did is I change something in the enemy collision code. in the else function instead of using room_restart. I wrote a script for the player's death, because there will be many way that the player can die, so if I write a script for it , I wont have to create new function everytime. on the script, I use "if(global.checkpoint !=0)" which mean if the player died by colliding with the enemy, then it will turn the checkpoint color back to black and restart the game.





 The next day I'm going to watch the tutorial "one way wall", to make a wall that the player can go through.



No comments:

Post a Comment