[RPGXP]: Concept of Moving Character into another region

Introduction

I’m back to show you how to move the main character into another scene or map. The misconception of other Newbie RPGXP Developers or just exploring into Game Development is that they think that the original map is extended though the truth is there are many maps directing into the main map. Actually when you play 2D Games or even 3D Games when your character stepped into some point of the field you will end up triggering some functions like enemies appearing, secret places will be unfold and others. One example of this concept is that when you are playing Final Fantasy games the 2D one is that when you enter the door of a house your character will be transferred into the inner house though that is another map. This Blog will make you understand other functions as well.

In the RPGXP workspace

Here I have already designed a map that will be used to transfer the character though the functions are not yet set it is just a plain design and the Character Position is already set in the middle of the bridge I made. As you can see there is only One map present in the game so we cannot transfer the character until there is two maps or more present.

To create a map if you don’t know is by Right-clicking below the MAP001 and then New Map.

When you create a new map it is plain white or without design and if you are confused why when I created a new map there’s already a design no I have already designed it before I screenshot it.

Adding Function

Okay to enable to pop up the function window/Event Window is that first make sure you are in the Event Layer or You have clicked the Blue Cube in the upper left side between those three sheets of paper and the Pencil tool then double click the region or coordinates which you want to set your function so I chose the right end side to make it more realistic that it will transfer after walking into the region. Now when the Event Window has popped up press Enter then Find the “Transfer Player…” Click that.

Now when you clicked the “Transfer Player…” button this will pop up(Image Below) now there are Two different ways to appoint the place where you want the character to appear. First is Direct appointment and it is the most easiest way to do it and that will be the function will be using. I will explain the Appoint with variables below.

The Image below will be the result when you clicked the button with an arrow in the Direct appointment function. The Direct appointment function is easy as I said because you will just click the region and OK and apply that’s it. In the case of Appoint with variables and if you are a bit nerdy Map ID is the Name of the map so you will be Entering MAP002 then the size of MAP002 is 20 width x 15 height so you will be inputting in Map X: 0 and in Map Y: 12.

Now when you have applied the transfer function your character can transfer now into the right side map though he cannot go back into the middle map again because there is no function in MAP002 to transfer your character into the middle map/MAP001. In the Image below I added one optional function the “Show Text…” so after your character has been transferred into the Map002 the text will appear and I set the text “I’m in the right side!”.

Now when your done with the functions it will look like in the image below. Now when you notice in the “Trigger Group Box”(with the function Action Button etc.) I changed it to “Player Touch”. If this event is Triggered by the “Action Button” this event will only function if the player has pressed the button for response, if this event is Triggered by the “Player Touch” this event will only function when your character steps INSIDE the region, if this event is Triggered by the “Event Touch” this event will only function when your character steps the surrounding region/box of the event region/box, if this event is Triggered by the “Autorun” this event will function automatically at the start of the game and it will transfer your character into the another map at the start of the game and finally if this event is Triggered by the “Parallel Process” this event will only function if other Event Region/box calls out THIS event.

Now do the same thing in the MAP002 add the function “Transfer Player…” and add “Show text…” though I changed the text “I’m back in the middle!” so let’s test the game.

Inside the Game

Now as you can see the image below our character is not inside the region box that we have set our function so when our character stepped inside that region box he will be transferring into the MAP002.

Now in the image below pertains that our character has been transferred and the text showed up. In MAP002 the Region box that I have set the function is the player’s current position as you see the image below but the function will not function unless the character goes away and goes back into that region/event box.

Now In the Image below the Character is now outside the region/event box and will be walking inside the region/event box. As I said the event will only function if the character goes outside the region where you transferred and goes back in the region box to trigger the function of that current region/event box.

Now the character has entered the region/event box so the text showed up “I’m back in the middle!” so that’s it! I have covered the concept of moving character into another region.

Thanks for Reading! Stay tuned! 🙂

Advertisements