#Switching from one map to another on an rpg game

1 messages · Page 1 of 1 (latest)

dusty field
#

Hello everyone, I'm brand new on GameMaker and I make a RPG Game with the RPG Game Template.
I don't know how to get from one map to another ; I've created two maps that should meet, but when I want to switch from one map to the other, my camera doesn't follow, and I'm in a void.

#

I don't speak English very well, so there may be mistakes.

tribal hemlock
#

when you say two maps do you mean two rooms? if so you need to write code to make it switch between rooms. a really simple one would be having your playerObj be persistent, and having a warpObj object that has this code in it's step event:

if place_meeting(x,y,playerObj){
  room_goto(targetRoom); 
  playerObj.x=targetX;
  playerObj.y=targetY;
};

this makes it so when the player touches that object, the room switches to the next room, and the player moves to the position x = targetX and y = targetY (be careful not to send the player on top of another of these warpObj this would make the player ping pong back and forth between the two rooms.)

and then you can either have this in it's variable definitions or it's create event:

targetRoom=noone;
targetX=0;
targetY=0;

this allows you to change the targetRoom, targetX and targetY for each individual instance of the warpObj you place in your rooms, by simply altering it's variable definitons or it's instance creation code, so you won't need to make a whole new object for each room you want to be able to switch to.

#

this is a really simplified version. if you want a tutorial on this there's this video: https://www.youtube.com/watch?v=xlqFO_fuCEo&t=2s&ab_channel=PeytonBurnham

it also teaches you how to do a cool transition animation

dusty field
#

Okay, I'll try that, thank you very much!

#

I've been watching the videos offered with the RPG Gamer Template, except that they don't explain all the functions and how to make your game even better.

#

Btw, do you know if it's possible to create quests, bosses, villages, and other things?

tribal hemlock
# dusty field Btw, do you know if it's possible to create quests, bosses, villages, and other ...

Yes, but you need to program everything on your own. I would recommend watching youtube tutorials from the community, and trying to make your own stuff based on that.

The youtube channel i sent has a lot of tutorials that personally i think are great for beginners since it explains the logic behind it. Watch that series from the start, there's also a dialogue series, a save system, a music system, and other stuff.