|
01-29-2011 01:36
Posted by:
Connors
Location:
Albuquerque

|
Light Maze is still in development but I wanted to try my hand at a platformer as well. Problem is I hit a glitch right away. I want the player to stop when the next tile is not #25 (blue) so what did I do wrong? (Grid size is 22.)
run = 1
repeat
mapX = (playerX/22)
mapY = (playery/22)
set pen color white
draw text 100, 100, as string (map tile (mapY+1, mapX, 0))
IF map tile (mapY+1, mapX, 0) = 25
yspeed = 22
else
yspeed = 0
end if
playerx = playerx+xspeed
playery = playery+yspeed
sprite 0, playerx-7, playery, 1
sprite 1, playerx, playery, 0
if pressed(55)
if pressed(12)
run=0
end if
end if
draw frame
|
|
01-29-2011 09:32
Posted by:
allnodcoms
Location:
hertfordshire (England)

|
Check your syntax,,,
map tile('X', 'Y')
That should solve your problem ;o)
Danny (nod the mod)
|