Puzzle idea - it's realistic in rpg maker

Wow, now I understand it. It's simpler than I thought the whole time. I'm thinking to complex.

That's the border solution for my "T"tile.
◆Control Variables:#0011 Player Map ID = Map ID
◆Control Variables:#0012 player x coord = Map X of Player
◆Control Variables:#0013 player Y coord = Map Y of Player
◆Get Location Info:Player Map ID, Event ID, ({player x coord},{player Y coord})
◆If:Player Map ID = 5
◆Change Party Member:Remove Ich
◆Change Party Member:Add Cursor1
◆Show Choices:Up, Down, Left, Right, Rotate, Cancel (Window, Right, #1, #2)
:When Up
◆Control Variables:#0031 check puzzle T y coords = Map Y of This Event
◆If:check puzzle T y coords > 1

◆Set Movement Route:Pattern T
:Set Movement Route:◇Move Up
◆Set Movement Route:This Event
:Set Movement Route:◇Move Up
◆Set Movement Route:Player
:Set Movement Route:◇Move Up
◆
:End
◆
:When Down
◆Control Variables:#0031 check puzzle T y coords = Map Y of This Event
◆If:check puzzle T y coords < 11

◆Set Movement Route:This Event
:Set Movement Route:◇Move Down
◆Set Movement Route:Pattern T
:Set Movement Route:◇Move Down
◆Set Movement Route:Player
:Set Movement Route:◇Move Down
◆
:End
◆
:When Left
◆Control Variables:#0030 check puzzle T x coords = Map X of This Event
◆If:check puzzle T x coords > 1

◆Set Movement Route:Pattern T
:Set Movement Route:◇Move Left
◆Set Movement Route:This Event
:Set Movement Route:◇Move Left
◆Set Movement Route:Player
:Set Movement Route:◇Move Left
◆
:End
◆
:When Right
◆Control Variables:#0030 check puzzle T x coords = Map X of This Event
◆If:check puzzle T x coords < 15

◆Set Movement Route:This Event
:Set Movement Route:◇Move Right
◆Set Movement Route:Pattern T
:Set Movement Route:◇Move Right
◆Set Movement Route:Player
:Set Movement Route:◇Move Right
◆
:End
◆
:When Rotate
◆Set Movement Route:Pattern T
:Set Movement Route:◇Direction Fix OFF
:Set Movement Route:◇Turn 90° Right
:Set Movement Route:◇Direction Fix ON
◆
:When Cancel
◆Transfer Player:Puzzle_1 (2,2) (Fade: None)
◆
:End
◆
:Else
◆Change Party Member:Remove Cursor1
◆Change Party Member:Add Ich
◆
:End

Yeah. It works perfectly. Now I will also try your tutorial for not collide. Thank you so much.
This is for if you just want to center's to not collide with each other.

Say you have 1 puzzle piece and it's center is on X:5, Y:12.
And a second puzzle piece on X:5, Y:13.

Set a set of variables to puzzle piece 01's location.
PuzzlePiece01-X = 5
PuzzlePiece01-Y = 12

And the same for the second puzzle piece.
PuzzlePiece02-X = 5
PuzzlePiece02-Y = 13

Now when you try to move any puzzle piece first check that the location it's going to doesn't match the same values as any other piece.

So when we try to move puzzle piece 1 down in this example before moving we set the current location again then:
PuzzlePiece01-Y + 1

Then we check if piece 01s numbers match any other pieces, in this case it would match 02 so we exit event processing and don't allow the movement to proceed.

But if we tried to move it any other direction it wouldn't match and we allow the movement to take place.

I made this for my T puzzle tile to don't collide with the P puzzle tile for the movement down. It works with when I add the variable puzzle T y coords + 3. The T puzzle only touch the P puzzle tile. Perfect. But with this setting I can't move down the T puzzle on the whole y coords anywhere else. I think I have to set also a condition branch with the x coords of the T puzzle tile. I tried it, but it doesn't works.

Here is my code of T. Maybe you see the failure or what's missing.

1679564586577.png

1679564652542.png



And this is the code of P tile.

1679564703912.png
I haven’t been following this closely so hopefully @ManaBrent will be able to see the issue right away.

I do find it curious that you are assigning the Variable 11 to the game data Map ID and then immediately reassigning the value of Variable 11 to the Event ID at the X & Y coordinates of the player.

Again, I know this isn’t a specific answer to your current event situation, but I did just post a tutorial on moving events and part of that is how to check for collision conflicts using coordinates. I don’t know if it will help, but I am leaving the link here.

I hope this helps and that someone else can find exactly what might be going on with your event above.

Good luck!

I do find it curious that you are assigning the Variable 11 to the game data Map ID and then immediately reassigning the value of Variable 11 to the Event ID at the X & Y coordinates of the player.
Hey thank you for this advice. I copied it from a common event which I used in my game. Here I think it makes no sense, because it's all on the same map. I delete this section.
You're right that you'll need to check that you're not colliding with the X value as well, the current branch checking Y can all go inside the new one checking X.

(Although if this gets any more complex it would be easier for you to move the movement routes outside the conditional branch checks, and instead use a label to jump past the movement when the checks fail. That just makes it easier to check a lot of things at once and not have to copy the move routes over and over).

It's hard to answer clearly because I still don't know exactly how you want the pieces to behave.
You're right that you'll need to check that you're not colliding with the X value as well, the current branch checking Y can all go inside the new one checking X.

(Although if this gets any more complex it would be easier for you to move the movement routes outside the conditional branch checks, and instead use a label to jump past the movement when the checks fail. That just makes it easier to check a lot of things at once and not have to copy the move routes over and over).

It's hard to answer clearly because I still don't know exactly how you want the pieces to behave.
Hey very good hint with the label. I have to try it out.

But to check also x and integrate y in the conditional branch, I think I have to use the command "get location info", right to check x and y?

Only to command with the variable and a conditional branch didn't solve the problem that the puzzle tile stop moving down in the y coords in the whole line. It should only stop if it's in the y coords line of the other puzzle tile and would move into it. But if the puzzle tile is at an other place I should can move it down the whole y coord line.

Here is my attempt for the command movement "down":

◆Comment:Save location y of event to check if it would move out of the border
◆Control Variables:#0031 puzzle T y coords = Map Y of This Event
◆If:puzzle T y coords < 11
◆Comment:Save current location of this event for check collide
◆Control Variables:#0034 collide puzzle T x = Map X of This Event
◆If:collide puzzle T x ≠ collide puzzle P x

◆Control Variables:#0035 collide puzzle T y = Map Y of This Event
◆Control Variables:#0035 collide puzzle T y += 3
◆If:collide puzzle T y ≠ collide puzzle P y
◆Set Movement Route:This Event
:Set Movement Route:◇Move Down
◆Set Movement Route:Pattern T
:Set Movement Route:◇Move Down
◆Set Movement Route:Player
:Set Movement Route:◇Move Down
◆
:End
◆
:End
◆
:End

I hope that's the last step in my learning, how I can make this happens. Sorry, that I ask so much!
With the "get location info" it works fine!

◆Comment:Save location y of event to check if it would move out of the border
◆Control Variables:#0031 puzzle T y coords = Map Y of This Event
◆If:puzzle T y coords < 11
◆Comment:Save current location of this event for check collide
◆Control Variables:#0034 collide puzzle T x = Map X of This Event
◆Control Variables:#0035 collide puzzle T y = Map Y of This Event
◆Control Variables:#0035 collide puzzle T y += 3
◆Get Location Info:Collide Puzzle T ID, Event ID, ({collide puzzle T x},{collide puzzle T y})
◆If:Collide Puzzle T ID ≠ Collide Puzzle P ID

◆Set Movement Route:This Event
:Set Movement Route:◇Move Down
◆Set Movement Route:Pattern T
:Set Movement Route:◇Move Down
◆Set Movement Route:Player
:Set Movement Route:◇Move Down
◆
:End
◆
:End

Original thread: https://forums.rpgmakerweb.com/threads/puzzle-idea-its-realistic-in-rpg-maker.155876/