Got another big problem now, the animation wont start when i walk forward it starts just after i release the arrowbutton I think i have to make some sort of for loop but not really shure huw to do it can someone please help me with the problems here, I have no soloutions on these problems i have writed here. Please someone help me if ya know how I can solve these problems. I would really be glad
Rem Project: project_subworld
Rem Created: 2004-11-18 15:39:03
Rem ***** Main Source File *****
remstart load image for loading
load image "media\gfx\loader.tga", 1
load image "media\gfx\iconb.tga", 2
sprite 1,120,200,1
sprite 2,400,200,2
set sprite 1, backsave = 0, transparency = 0
set sprite 2, backsave = 0, transparency = 0
remend
rem settings:
sync on : sync rate 50 : color backdrop rgb(0,0,0) : backdrop on
set text font "arial" : set text size 16
set text to bold : set text transparent
rem Loading prompt
sync
load image "media\gfx\loader.tga",1 : paste image 1,110,200
load image "media\gfx\iconb.tga",2 : paste image 2,380,200
sync
rem recolor backdrop
color backdrop RGB(0,128,0)
remstart Set camera
set camera range 0.1,5000
position camera 2,3,2
rotate camera 0,45,0
remend
rem load level
load bsp "media\levels\mp1\ikzdm1.pk3","ikzdm1.bsp"
load object "media\models\test\tree.3ds",2 : position object 2,35,0,0
set bsp camera collision 1,0,0.75,0
set bsp collision threshhold 1,0.001
rem load model
load object "media\models\test\player_20.3DS",1
rem play object 1
rem loop object 1
scale object 1,100,100,100
position object 1,0,0,0
yrotate object 1,180
fix object pivot 1
set bsp object collision 1,1,0.75,0
rem Main loop
_back:
do
rem control player
gosub _walkanim
rem camera control
x#=object position x(1)
y#=object position y(1)
z#=object position z(1)
a#=object angle y(1)
d#=300.0
h#=150.0
s#=50.0
set camera to follow x#,y#,z#,a#,d#,h#,s#,1
rem Apply simple gravity to camera and player
position camera camera position x(),camera position y()-0.5,camera position z()
position object 1, object position x(1),object position y(1)-1,object position z(1)
rem jump
if spacekey()=1 then position object 1 ,object position x(1),object position y(1)+5.0,object position z(1)
rem Show Framerate
text 20,screen height()-40,desc$
fps$="Test of amount Fps: "+str$(screen fps())
text screen width()-20-text width(fps$),screen height()-40,fps$
rem Update screen
sync
rem End loop
loop
end
rem control player
_walkanim:
walk=0
if upkey()=1 then move object 1,4 : walk=1
if downkey()=1 then moveaction=2 : move object 1,-4
if leftkey()=1 then moveaction=3 : yrotate object 1,wrapvalue(object angle y(1)-3)
if rightkey()=1 then moveaction=4 : yrotate object 1,wrapvalue(object angle y(1)+3)
if walk=1 then play object 1
if walk=2 then play object 1
if walk=3 then play object 1
if walk=4 then play object 1
return
You never fail, only make mistakes.