forums

TNT Basic Forums > Games In Progress
The Platformer
< Last Thread     Next Thread >
Author
Thread        Post A Reply

01-29-2011 01:36

Posted by:
Connors

Location:
Albuquerque

Find more posts by Connors

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)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Check your syntax,,,

map tile('X', 'Y')

That should solve your problem ;o)

Danny (nod the mod)

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.