RPG Layout Switch

0 favourites
  • 5 posts
From the Asset Store
Over 1700 16x16 pixel art RPG icons for item and skills
  • Hey guys

    I am making a RPG? But before you clutch your chest. I just want to know how to make a character switch from one layout to the next when they reach an end point. And if you can do that. . . .like in pokemon. The game I'm making isn't as hard as you may think.. . .well the art part is but it's only for a class project!

  • You could use 4 invisible bars on each side of the layout. If the current layout is 3 (example) and the player collides with the right hidden bar (example) - go to layout 4. If he collides with the left bar and is on layout 6 - go to layout 5 and so on.

  • I haven't done this in Construct or C2 yet, but I remember in MMF2 when I did this, I would make two variables: one for the X position and one for the Y position. This way when you left a layout, it would retain what your X and Y are, so when you program your basic screen functions, you tell it to spawn you at the proper X or proper Y position. I would also probably have made another variable (0-3 or 1-4 depending on your style) that says which way you exited the layout. You can figure this in various ways, from the screen detectors as mentioned above, OR based on the direction your character is facing when it leaves the layout (no detectors needed, keeps from having too many objects in your game).

    So if 0 is north, and you leave the layout and you are facing Up, you would switch to whichever screen you wish to load, and since you know you were facing up, you can put your character at the bottom of the next layout, and since you also know the X coordinate you can tell it to just place him at that same X position. (Same for the left side, you know he will be on the right side of the next screen and positioned at the same Y coordinate).

    This requires your layouts to all be the same size, and if you have a different size layout then you would have to specify where you enter and exit from.

  • Thanks guys. I am VERY new to this game design stuff. I literally don't get it to a "understanding" level. Our class is basically an independent study class with assistance/instructions/teachings when needed/or required.

    roracle, All my layouts may not be the same size. Since this is a project I would love to continue in depth later I'll probably try my best. He was very vague with this assignment. It just has to have the things we taught each other in class.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Okay, programming with Construct 2 is very easy. I have never had classes or read books on programming, but I know how to follow instructions, and that's what computers do. So it was kind of a no-brainer really. Sure I started with Klik & Play back in the yore, but I have hardly touched a traditional programming environment nor had proper training in programming either. I hope you have fun using C2 and I'll help where I can when I can.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)