GameMaker: Studio

GameMaker: Studio

檢視統計資料:
Morosaurus 2012 年 10 月 3 日 下午 4:07
Pausing?
Is there any way to pause the game without using GML and if it does have to have GML could someone make it simple and explain what each thing does?
< >
目前顯示第 16-20 則留言,共 20
Fable 2012 年 10 月 6 日 下午 4:19 
I don't know if there are any detailed scripting tutorials, but it's pretty easy to learn.

Just go through the help file. Actually, if you download GM8.1 from the site, and use its help file, it has a bit more detail (it almost seems like GMS' help file was written solely for people that upgrade). Once you've learned the stuff in the GML Language Overview section, and you've got an idea of what each function does, it's literally just matching up functions, and checking to see if a certain condition is met.

A big part of it is learning what functions return what. For example, things like instance_exists() or collision_rectangle() return true or false, so you'd write a conditional statement like:

if (instance_exists(obj_something)) { //do something...for example... x += 1; }

The savvy comes in knowing what everything does and how to match it up to get the effect you want.

Also, you don't HAVE to code like I did, per say, you could even do something closer to the structure of Python than C, like...

if instance_exists(obj_something) //do something...for example... x += 1

...and I'm pretty sure that's valid code. You can mix and match, just if you use curly braces, you have to close the curly braces, and if you wrap your conditionals in parentheses, you have to close the parentheses and so on.

But yeah, the leading authorities right now are the GM8.1 manual and the YoYoGames Wiki[wiki.yoyogames.com], so far as I know.

You WILL want to read the GMS manual, but like I said, the GM8.1 manual was much better for just learning the language.
Fish! 2012 年 10 月 6 日 下午 5:04 
Thanks.

I have a little programming experience and the logic part comes naturally for me. I'll try those references, might even read the GM8.1 manually but one problem I think with 8.1 to GMS is that some odd functions have been made obsolete and can not longer be used. So what was valid script now just throws a compiler error.

But personally I don't mind the challenges of creating custom functions to do even that which might be built in there. :-)
Smcelrea 2012 年 10 月 6 日 下午 5:11 
Could you not "for no coding" just do an if variable event? Put everything you want to pause into "if variable pause = 0" around the drag and drop blocks and when pause is turned on it will ignore that part?
Fable 2012 年 10 月 6 日 下午 5:23 
引用自 Fish!
but one problem I think with 8.1 to GMS is that some odd functions have been made obsolete and can not longer be used. So what was valid script now just throws a compiler error.
The only ones that don't work are explicitly listed in the GMS manual, and out of all of them, it's not a large list, and most of them are actually not as necessary for regular game development as people make them out to be.
Jotlane 2013 年 11 月 26 日 下午 5:09 
There is a nice simple way to pause you game. First, create an object, then in a key press event (whatever key you want to use to pause) save the game in a save file named "pause" or something like that, then go to another room. This room will be your pause menu. You can customise this room easily, and you can also use this method for inventories or settings. To exit, simply create another object where if you press your pause key again it will load the game right where you left off.
< >
目前顯示第 16-20 則留言,共 20
每頁顯示: 1530 50

張貼日期: 2012 年 10 月 3 日 下午 4:07
回覆: 20