Hello, Im making a little fps game (its my first game)
Ive made a gun in Milkshape 3d exported as an .x file.
Anyway i got some simple Mouselook code from searching around in the forums, but i dont want the character to fly up in the air when you aim up
And the .x file (gun) just continues on the ground
And it would be good if someone told me how to make some simple collision. (i want the object and camera to stop when it hits a certain object)
Please Help me!
Heres my code (i removed the lines with Texturing objects and playing music)
Print "Loading" : sync
Make camera 1
Position camera 1, 0, 0, -200
load object "gun.x", 4
Position object 4, 0, -1 ,-200
make object box 2,500, 1, 500
Make object box 1,1,50,100
Make object box 3,100,50,1
make object box 5,1,50,100
position object 3,50,0,50
position object 1 ,0,0,0
Position object 2, 0, -20, 0
position object 5,50,0,0
Set ambient light 25
Color ambient light RGB(255, 255, 255)
Do
if keystate(30)=1 then turn camera left 1,0.1
if keystate(32)=1 then turn camera right 1,0.1
if keystate(17)=1 then move camera 1,0.1
if keystate(31)=1 then move camera 1,-0.1
if keystate(30)=1 then turn object left 4,0.1
if keystate(32)=1 then turn object right 4,0.1
if keystate(17)=1 then move object 4,0.1
if keystate(31)=1 then move object 4,-0.1
rotate camera 1, camera angle x(1)+mousemovey(), camera angle y(1)+mousemovex(), 1
loop
Weeee