Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

set movement route problem

CynicSyndrome

Towns Guard
Xy$
0.36
I'm trying to use these puddles as kind of a teleport pad. when the player steps on the outer ring it should put them on a set movement route to the center. the middle pieces are easy, but the corners are where i'm stuck. I need the corners to set a different route depending on whether approached from A or B (see PNG file). I have set characters X and Y cords to variables and I've tried using self switches and conditional branches but it never works out.
 

Attachments

eivl

Local Hero
Xy$
0.00
I am not sure what you are asking?

Are you asking : how do i check from what tile have the character moved from?
 

MinisterJay

Administrator
Staff member
Administrator
which part has you confused? look at the picture and read it again. not to worry, I figured it out already.
I just figured it out myself, where you are teleported is contingent on direction entered from. One method is to have the spots next to it having events assigned different switches. When the teleport pad is touched, it looks at which switch was activated and teleports accordingly. Then the specific switch is turned off.
 

CynicSyndrome

Towns Guard
Xy$
0.36
no. that's not what I wanted. I wanted the corner pieces to put you on a "set movement route" toward the center. in order to achieve the exact center no matter what, the route has to be different if you enter from the side or from above/below. I ended up using the characters x coordinate as a variable, there was no need for the y. see the picture.

If Char X Coord = A
Set movement route:
Left, Left, Down
Transport to [desired locartion]
Else, (If Char X Coord = B)
Set movement route:
Down, Down, Left
Transport to [desired locartion]
 
Last edited:

CynicSyndrome

Towns Guard
Xy$
0.36
yep. it works great now. I created one version that could be used all the way around the ring using x and y cords, but i'm not using it because its too much editing when creating multiple rings.
 

eivl

Local Hero
Xy$
0.00
no. that's not what I wanted. I wanted the corner pieces to put you on a "set movement route" toward the center. in order to achieve the exact center no matter what, the route has to be different if you enter from the side or from above/below. I ended up using the characters x coordinate as a variable, there was no need for the y. see the picture.

If Char X Coord = A
Set movement route:
Left, Left, Down
Transport to [desired locartion]
Else, (If Char X Coord = B)
Set movement route:
Down, Down, Left
Transport to [desired locartion]
clever ;)
 
Top