How do I - portal doors (platform)

Get help using Construct 2

Post » Tue Sep 01, 2015 4:09 am

Event - Player on collision with Door 1
Action - (move position-player moves to Door 2)

this part works fine, its when I add the reverse equation that it gets all messed up.

Event - Player on collision with Door 2
Action - (move position-player moves to Door 1)

once I have this second equation implemented, when the player runs into the first door at the layout start, nothing happens because of the 2nd equation immediately spawning the player back to door 1 as door 1 is simultaneously spawning the player at door 2. Make sense?

I've tried everything I can think of, adding wait times, destroy usage, a global variable that i probably didn't correctly make. Any help would be great. I can't post a capx because Im on a boat in the middle of the ocean and only have internet on the work computer.
B
3
Posts: 5
Reputation: 185

Post » Tue Sep 01, 2015 6:31 am

This works like that you descripbed.

A solution could be to move the player further then the other door when moving through the door. Like teleport him to in front of the other door. not inside it

Event - Player on collision with Door 1
Action - (move position-player moves to Door 2 + SOME_MORE)

Event - Player on collision with Door 2
Action - (move position-player moves to Door 1 + SOME_MORE)

Or set a flag 1 when the player has moved through the door and set it to 0 when its not overlapping door, and only let it move through when this flag is 0.

Event - Player on collision with Door 1
Event - AND MoveThrough = 0
Action - (move position-player moves to Door 2)
Action - Set MoveThrough = 1


Event - Player on collision with Door 2
Event - AND MoveThrough = 0
Action - (move position-player moves to Door 1)
Action - Set MoveThrough = 1


Event - NOT(Player overlapping with Door1)
Event - NOT(Player overlapping with Door2)
Action - Set MoveThrough = 0
B
10
S
2
G
1
Posts: 51
Reputation: 761


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, el3um4s, Ryan Kocourek, TylerJS and 9 guests