Appear at proper door when switching layouts.

Get help using Construct 2

Post » Tue Sep 16, 2014 1:29 pm

I've been messing around with doors and I can't seem to get the player to appear at the doorway on the new layout. Obviously if I set the play to start at the door at the start of the layout it looks like he went through the door but that doesn't help if I have multiple doorways on the layout or a spawn point away from a door. Is there a way to tell the player which door he should appear at on the other side?

So yeah, I was wondering if anyone had any ideas on how to make a door system between layouts.
B
5
Posts: 29
Reputation: 758

Post » Tue Sep 16, 2014 1:57 pm

Use a global variable for the x and y position that you want to spawn at on the new layout.
Set these when you travel through the door on the previous layout
B
50
S
22
G
14
Posts: 174
Reputation: 10,842

Post » Tue Sep 16, 2014 2:26 pm

Give each door the details for the next layout.
You do not have the required permissions to view the files attached to this post.
ImageImageImage
B
71
S
22
G
247
Posts: 3,756
Reputation: 137,558

Post » Mon Dec 01, 2014 8:01 am

Sorry, it took me a while to get around to trying this out.

Anyways this is what I input:
Image

Unfortunately if I keep the destroy option on it shows me a random spot on the layout upon starting. When I turn it off the doors don't work. I'm not sure how you are choosing the layout name in the coding and I think that may be the problem. When I tried to play with the destroy/spawning settings I wound up with this:
Image



I tried a couple of other ideas I had which looked like this:
Image
This works out pretty well if I am going from 'Testarea1' to 'Testarea2' but once I am on 'Testarea2' all the doors don't work despite having the same coding aside from the necessary reversals. It's also really long.

Any Ideas?
B
5
Posts: 29
Reputation: 758


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests