I need expert advice

Posted by DSG on March 2, 2006, 5:26 p.m.

In GM, i need to know a few things

1 - you know how u can make a variable right? well, how do you make a global variable that is known to all objects (and not something like OBobject.variable) but something that doesnt need an object to exist or doesnt change or disappear when u switch from rooms? (example score, health, etc)

2 - Is there a way to change the game ID in the game? (so i can have different high scores tables, like 1 for the main game, maybe a different set of scores for different mini games, maybe one for battle mode or something)

3 - how do u tell game maker to open something from a directory? like in the game?

Comments

Josea 18 years, 10 months ago

globa.variable=something

add the global to the variable and it'll be accesible by everybopdy in any room.

2.- You can't change it on the fly of course, but in the game options you can.

3.- Well, depends, you can use any of the open things functions and there you can specify the full path starting from the drive (eg.g C:/WINDOWS/System32/help.dll)

Kaz 18 years, 10 months ago

1.global.variable=value

2.No.

3.Maybe get_open_filename()

Example-

file=get_open_filename("MP3|*.mp3|JPG|*.jpg","")

That will let the user choose from any mp3 or jpg, dont knwo how to make it look in a certain directory though.

And why did you need an expert? =P

gamehawk 18 years, 10 months ago

Manual is your best friend.

DSG 18 years, 10 months ago

OK now i need to know what the file extention is for a save file (i cant find it! is it .dll or .txt ? )

DSG 18 years, 10 months ago

nevermind i just first saved the game file as savegame.sbz and used that as the filter and it worked

flashback 18 years, 10 months ago

lol, why can't you just use game_load()?

Kaz 18 years, 10 months ago

Quote:
OK now i need to know what the file extention is for a save file (i cant find it! is it .dll or .txt ? )
You can save it as anything. All mine are .kaz =P

DSG 18 years, 10 months ago

thanx kaz i already figured that out

KaBob799 18 years, 10 months ago

yeah i use .tzc for my files, i think it gives your games an originality if you use your own file extensions.

SleepinJohnnyFish 18 years, 10 months ago

how can you make such amazing games and not know what a global variable is?