Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
edit: marking my rooms as persistent causes it to crash
So, in other words, make the elevator object use room_goto(numb) to go to a specific room, and use instance creation code in the Room Editor to set a custom variable for the elevator object instance, to decide which specific room to go to.
One of the ways (by no means the only way) that you could do that would be to have a persistent object in the first room of the game (which should be a simple one-off "initialization" room or such, which'd instantly then go to a menu room or the first level afterwards), called "object_system" or "obj_system" or such (I always do that whenever I make a GameMaker: Studio thing). (The Create Event of that object can be set to go to the next room.)
Then you can have that "system" object store a custom checkpoint variable or such, which can determine where the player object should start.
For example, you could use the Room Editor to add creation code to the player object instance, doing something like...
So, in other words, make a persistent "system" object, have that object store a custom checkpoint variable, have the elevator set that variable, and have the player check for that variable to make the player spawn somewhere else in a room.
the video shows a nice way to save to file information you would like to have when the player plays the game. You could have the player write down where they were when they left. And then load up the location when they return. Maybe more than what you need. Not sure what you got built and what you plan on building in the future.
Thank you for your contribution, I never had room_to_go_to on my radar up until this point, that is a very interesting way to transition between levels. I'll need to keep this in mind!
Funny that you mention it, after a few hours of experimenting I ended up doing exactly as you suggested with having an object system create an object that pushes me into the next room so to speak. I'm really proud to say that now I have a functioning elevator! The door opens and closes, reacts to button press, and transitions back and forth between levels while making all the necessary noises. Even with some elevator music! Thanks to both of ya