Hi everyone
Please can someone help see if there are any errors in my code.
All I want to do is texture a car I got from DarkMatter but it just wont seem to work. I have tried using the .x model file with .dds texture file and also .3ds model file with the .bmp texture file :S
The thing is I have textured the same car before in another project and it worked fine.
#CONSTANT player_one 1
#CONSTANT player_img 2
#CONSTANT forward_move 1
#CONSTANT backward_move -1
TYPE tvector
x AS FLOAT
y AS FLOAT
z AS FLOAT
ENDTYPE
TYPE tplayer
id AS INTEGER
pos AS tvector
fspeed AS FLOAT
bspeed AS FLOAT
ENDTYPE
GLOBAL car_one AS tplayer
car_one.id = player_one
LOAD IMAGE "car_img.dds",player_img
initialize()
loadp1()
DO
cords_debug()
controlp1()
SYNC
LOOP
FUNCTION initialize()
SET DISPLAY MODE 1024,768,32
AUTOCAM OFF
POSITION CAMERA 0,10,0
POINT CAMERA 0,0,0
COLOR BACKDROP RGB (255,0,0)
SYNC ON
SYNC RATE 60
ENDFUNCTION
FUNCTION loadp1()
LOAD OBJECT "car.x",player_one
TEXTURE OBJECT 1,player_img
`SCALE OBJECT TEXTURE player_one,1,1
ENDFUNCTION
FUNCTION controlp1()
if upkey() = 1 then move object 1, .2
if downkey()=1 then move object 1, -.2
if leftkey() = 1 then yrotate object 1, (object angle y(1) - 0.8)
if rightkey() = 1 then yrotate object 1, (object angle y(1) + 0.8)
ENDFUNCTION
FUNCTION cords_debug()
x = OBJECT POSITION X(player_one)
y = OBJECT POSITION Y(player_one)
z = OBJECT POSITION Z(player_one)
TEXT 20,20,STR$(x)
TEXT 20,30,STR$(y)
TEXT 20,40,STR$(z)
ENDFUNCTION
Any help would be appreciated