Tutorial by Nike197030th Sep 2009 10:25
|
---|
Summary Missing and wrong brackets Description There are some missing and wrong brackets. So the tutorial starts with an error. After fixing this it works great. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com rem TUT5C rem Control player direction rotate camera camera angle x(0)+(mousemovey()/2.0),camera angle y(0)+(mousemovex()/2.0),0 rem Control player movement cx#=camera angle x(0) : cy#=camera angle y(0) if upkey()=1 then xrotate camera 0,0 : move camera 0,0.2 : xrotate camera 0,cx# if downkey()=1 then xrotate camera 0,0 : move camera 0,-0.2 : xrotate camera 0,cx# if leftkey()=1 then yrotate camera 0,cy#-90 : move camera 0.2 : yrotate camera 0,cy# if rightkey()=1 then yrotate camera 0,cy#+90 : move camera 0.2 : yrotate camera 0,cy# if wrapvalue(camera angle x(0) > 40) and wrapvalue(camera angle x(0) < 180) then xrotate camera 0,40 if wrapvalue(camera angle x(0) > 180) and wrapvalue(camera angle x(0) < 280) then xrotate camera 0,280 |