How do I: Warp/Teleport my player (RPG Maker Style)

Get help using Construct 2

Post » Tue Mar 10, 2015 3:44 pm

Hello,

So i'm trying to get my player character to go inside buildings.

Exemple:
Layout1 is town map, player steps in front of a house door (press a button to open the door) ----> goes to layout 2 which is the interior of the house.
Then when Player steps back in front of the door (or uses a button to open the door) it goes back to town map (layer1) in front of the house.
The player is a global object of course.

If some are familiar with RPG Maker you'll know what i mean, i'm trying to have a similar effect (and i wish it was as easy in construct 2)
B
4
Posts: 9
Reputation: 218

Post » Tue Mar 10, 2015 3:53 pm

What do you have so far?? Cause I see you asked before in another thread.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Thu Mar 12, 2015 6:00 am

Hi,

Last time I asked how to go simply throught layouts (i didn't know the global object option)

If you pay attention this time it's a more precise problem.
I need the player to step on an object (placed in front of a doorstep) and send him to another layout at a precise point (the inside doorstep) and that works both ways.

At the moment i'm able to send him to another layout but it just pops in the middle of the screen.
i can't use the "set position at start of layout" since there will be some locations with more than 1 door.
B
4
Posts: 9
Reputation: 218

Post » Thu Mar 12, 2015 7:35 am

Can you set the doors up as collision objects, and then test map position and use a lookup table to determine which coordinate to switch to in the new layout?

Sorry, the problem isn't very clear.
B
9
S
2
G
1
Posts: 48
Reputation: 710

Post » Thu Mar 12, 2015 11:21 am

@Fusdarri
I know that. I was asking from that information what have you achieved so I can build from what you have developed. But someone will provide the answer to what your trying to do. I help out of kindness not for someone to feel entitled to be rude.
Last edited by PhoenixNightly on Thu Mar 12, 2015 6:02 pm, edited 2 times in total.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Thu Mar 12, 2015 2:31 pm

Your player should have two instances variables named "WarpX", "WarpY". When you step on something that makes you warp, set the variables appropriately to where you want the player to be when he "warps" to another layout. Then, on start of a layout, set the X and Y of your player to its WarpX and WarpY values.
B
69
S
28
G
24
Posts: 977
Reputation: 18,739


Return to How do I....?

Who is online

Users browsing this forum: evillair, Fenix18, mongoose665 and 57 guests