Everyone needs a break while playing a game, learn how to add that functionality to your game here! It’s versatile, and you can use it for GMS 1 and GMS 2.
Source Code: (notepad document)
Check out my GameMaker Studio course on Udemy for only $9.99:
Check out our website @ www.beyondusgames.com
Connect with us on Twitter @BeyondUsGames
Support us on Patreon @ www.patreon.com/beyondusgames
Outro Music courtesy of OC Remix.
Nguồn: https://shaarique.com/
Xem thêm bài viết khác: https://shaarique.com/game/
Josephine Powell
June 29, 2020Is there any way to stop from drawing sprites that are not visible? Such as transition areas and such.
Danny Jensen
June 29, 2020This works great thanks! Only thing is some instances in my game are marked as not visible, but they are drawn to the screen in my draw event. So I put this line
if instance_find(all, i).visible == true {
around my draw_sprite_ext code, but I get the error that unknown_object.visible not set before reading it. How can a built in variable not be set? By default all objects are set to visible so I'm not sure why I get this error, can anyone help plz?
VildStyle
June 29, 2020That's a cool system. One small thing I'd like to point out is surely it's more efficient to assign instance_find(all, i) to a variable, and reference that variable within the for loop? Currently, you're calling instance_find 10 times per loop as opposed to once per loop. Small, but might help
Razorik
June 29, 2020Wow! This was incredibly helpful!
I was actually going to do something kinda simple like take a screenshot and paste it over but I like your method better. Thanks for the video!
Darth Stal
June 29, 2020it doesnt work anymore :/ . i get an error that i havent said if it was flase or true before if statement. if i do esc key does nothing
Igor Sandu
June 29, 20209:20 – Wrong! It works like that in other languages, but not in GML! "i" will be destroyed after WHOLE event "Key Press – Escape" will be executed.
It's easy to check:
for (var i = 0; i < 10; i++)
{
}
new_variable = i;
That will not create a mistake. "new_variable" will be equal to 10.
silent_lesch
June 29, 2020You could just catch all the objects at application surface, store the surface, and then just draw it until unpause.
J_C
June 29, 2020Thanks for the tutorial. I read about a similar way to do this, which proved to be working quite well for me. Just before you deactivate the objects, you take a screenshot of the screen and display it. You do it through creating a sprite from the applicaton surface and save that sprite in a varible. Then draw the sprite on the surface. This way I didn't have to manage all the different objects. And when unpaused you destroy the sprite.
Taencred
June 29, 2020Hi Beyond Us Games. I have another problem that I'm not able to solve.
When paused, other objects start to appear on top of the player. I assume this has to do with the fact that they're redrawn after the player and therefore end up on top in the paused state. For example, if I walk up to a wall, I've made it so that the collision check only checks the bottom of my character, and therefore the character is beheaded by the wall when I pause. Any suggestion for an easy fix on controlling in which order things are redrawn during the pause? Sorry if I'm just missing something simple here but I'm rather new to data structures and arrays overall.
Cheers.
Elmin NCF
June 29, 2020nice work!
Dino Donut Man
June 29, 2020Hey could you do a 2.5 Denison tutorial I've been trying to make my own with no luck
Edit: for a platformer
Galewolf
June 29, 2020Hey, could you make a tutorial Projectile Motion in GMS2?
Aqare
June 29, 2020thanks for this helpful video, and your udemy course also seems to be interesting. are you actually planning to make an advanced udemy course one day?