Posted: 12th Apr 2004 16:40
im having a really strange problem, ive been following the program, but when i get to a certain point, when i type, nothing comes up in the editor, heres the code, ill use some astericks, to show you where i mean.
Rem Project: PacMan Tutorial
Rem Created: 12/04/2004 12:21:28
Rem ***** Main Source File *****
`Settings
set display mode 1024, 786, 32
hide mouse
sync on
autocam off
cls
global playerZ#
global playerY#
global playerUp
global playerDown
global playerRight
global playerLeft
`Calls Load Level
Load_Level()
`Create "MaxMan"
make object sphere 1000, 6
color object 1000, rgb(255,255,0)
Start_Level()
`The main Loop
do
Position camera 87, 150, 87
point camera 87,0,87
Player_Move()
Player_Turn()
Player_Show()
sync
loop
Function Load_Level()
mazeWall = 0
mazePill = 200
mazePower = 500
load image "blank.bmp", 1
make matrix 1, 128, 160, 16, 20
prepare matrix texture 1, 1, 1, 1
fill matrix 1,0,1
position matrix 1, 24, 0, 0
groundHeight = get ground height (1, 87, 87)
For MazeY = 1 to 20
for MazeX = 1 to 16
read maze
if maze = 1
inc mazeWall
make object cube mazeWall, 8
color object mazeWall, rgb(0,0,255)
position object mazeWall, (mazeX*8) + 20, groundHeight, (mazeY*8) - 4
endif
if maze = 2
inc mazeWall
make object cube mazeWall,8
color object mazeWall, rgb(255,0,255)
position object mazeWall, (mazeX*8) + 20, gorundHeight, (mazeY*8) - 4
endif
if maze = 3
inc mazePill
inc pills
make object sphere mazePill, 2
color object mazePill, rgb(255,255,0)
position object mazePill, (mazeX*8) + 20, groundHeight, (mazeY*8) - 4
endif
if maze = 4
inc mazePower
make object sphere mazePower, 4
color object mazePower, rgb(255,255,0)
position object mazePower, (mazeX*8) + 20, gorundHeight, (mazeY*8) - 4
endif
next mazeX
next mazeY
Endfunction
function Start_Level()
playerX# = 84
playerZ# = 52
groundHeight = get ground height (1, 87,87)
position object 1000, playerX#, gorundHeight, playerZ#
playerUp = 0
playerDown = 0
playerRight = 0
playerLeft = 0
endfunction
function Player_Move()
if playerUp then playerZ# = playerZ# + 1
if playerDown then playerZ# = playerZ# - 1
if playerRight then playerX# = playerX# + 1
if playerLeft then playerX# = playerX# - 1
endfunction
function Player_Turn()
if upkey()
playerUp = 1
endif
if downkey()
playerDown = 1
endif
if leftkey()
playerLeft = 1
endif
if rightkey()
playerRight = 1
endif
endfunction
function Player_Show
groundHeight = get ground height (1, 87,87)
position object 1000, playerY#, groundHeight, playerZ#
endfunction
********************************************
if i try to type anything here, the cursor moves but i see no text!!
*********************************************
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,3,3,3,3,1,3,3,3,3,1,3,3,3,3,1
Data 1,4,1,1,3,3,3,1,1,3,3,3,1,1,4,1
Data 1,3,1,1,1,1,3,3,3,3,1,1,1,1,3,1
Data 1,3,3,3,3,3,3,1,1,3,3,3,3,3,3,1
Data 1,1,1,3,1,1,1,1,1,1,1,1,3,1,1,1
Data 1,3,3,3,3,3,3,0,0,3,3,3,3,3,3,1
Data 1,3,1,3,1,1,1,1,1,1,1,1,3,1,3,1
Data 1,3,1,3,1,1,1,1,1,1,1,1,3,1,3,1
Data 1,3,1,3,3,3,3,3,3,3,3,3,3,1,3,1
Data 1,3,1,3,1,3,1,1,1,1,3,1,3,1,3,1
Data 1,3,3,3,1,3,1,0,0,1,3,1,3,3,3,1
Data 1,1,1,3,1,3,1,2,2,1,3,1,3,1,1,1
Data 0,0,0,3,3,3,0,0,0,0,3,3,3,0,0,0
Data 1,1,1,3,1,1,1,1,1,1,1,1,3,1,1,1
Data 1,3,3,3,3,3,3,1,1,3,3,3,3,3,3,1
Data 1,3,1,1,1,1,3,3,3,3,1,1,1,1,3,1
Data 1,4,1,1,3,3,3,1,1,3,3,3,1,1,4,1
Data 1,3,3,3,3,1,3,3,3,3,1,3,3,3,3,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1