Legacy GM help in go between rooms

M

Mombos

Guest
I have set ( the player's x and y = other.target_x ) when it get collision with the ( obj_door_trans ) .

and for go to the other room .

but go to the other room is not the problem
when I have set ( the player's x and y = other.target_x ) it doesn't really set his new x and y .

it go to the room i want but it doesn't set his new x and y .

can anyone help me ??

this is the project's file

https://drive.google.com/file/d/0B0RUviU5X37Ndi02WEhZY3JrVTA/view?usp=sharing

for more information about my problem :

https://forum.yoyogames.com/index.p...-y-for-the-player-but-set-the-new-room.20062/
 
Hello friend!,
I've found the solution to your problem. Your obj_player is using physics, so then setting x and y won't affect it (at all?). Instead, given the situation, you must set the "equation" to phy_position_x = other.x; and phy_position_y = other.y;.

Appart from that, when your problem is solved, if you switch rooms too quickly, you can actually "exit the room" (I mean the place where you should be, you exit the level; you are in that black part of the room). This is due to the obj_door_trans' properties; it is a sensor. You must actually collide with it, in order not to "escape" from the room. You have then two solutions:

1.- Make the object a non-sensor (I'd do this one, definetely).
2.- Put a colliding object at the end of the object.

As well, try to put the object inside the room, as GameMaker will try to delete it!!

- Wytrek GAMES (www.wytrekgames.wordpress.com)
ps: nice project (mechanics & sprites), good job!
 
Last edited:
Top