Problem with wall :(

beaudoin_nbeaudoin_n Member Posts: 184
edited November -1 in Working with GS (Mac)
Hi,

I have two floor tiles, and a player that moves from tile to tile. I created move objects to then change to location of the player from one tile to the other (either up down left or right) so basically my arrows change game attributes (like move = true, direction = up)
The player has rules when move is true it will move in the direction for 50 pixels.
All that works if i check run to completion

Now i want to put back the player on his tile if he is trying to go through a wall.
Unfortunatelly i can't make this work correctly. I have set self.MyposX = start position same for Y and i just have rule when overlap or collide with wall move to Myposx MyposY.

Problem is that the player object moves it 50 pixels , then goes back to where he was :(
I want it to either stay there (not move at all) or move a few pixels then just go back to the center of the tile.

To make things easy i have 50X50 tiles, 10Xx Walls, and the player is 45X45 actually can fit on a tile surrounded by walls.

Heeellp ;)

Thanks in advance

Comments

  • beaudoin_nbeaudoin_n Member Posts: 184
    No ideas ?
  • beaudoin_nbeaudoin_n Member Posts: 184
    Hi uploaded here

    http://gamesalad.com/game/play/35584

    let me nkow if you can help. keep in mind there aren't walls everywhere.. i tried collide but my object bounces off screen :(
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Hey,

    I tried to open the game, but it's just a black screen...
    could there be a syntax error in one of your rules?
    does it work for you on the web?

    Joe
  • beaudoin_nbeaudoin_n Member Posts: 184
    Sorry about that.. i have created my build for the future with main screen etc... but they are blank still until i gwt the logic to work.

    Can you download it ?
    If so look at what is under the scene Level

    Otherwise i guess i can just add a link to the level scene and update.

    Let me know

    Thanks
  • beaudoin_nbeaudoin_n Member Posts: 184
    Any ideas ?
Sign In or Register to comment.