Hey guys, been a while since I've posted, been busy with school. But I'm working on an FPS but there are a bump I've run into and just some general questions I have
First I'll start off with the problems I'm having.
I can't seem to make my gun get into the correct position, I'm using the LOCK OBJECT ON command and it no matter what I've tried it just won't get to where I want it.
Code
Rem ***** Main Source File *****
gosub _setup
do
playerx = object position x(2)
playery = object position y (2)
playerz = object position z (2)
// set camera to follow playerx,playery,playerz,1.0,0,10.0,1
//set camera to object orientation 1,2
if KEYSTATE(17)=1 then move camera 1,1.0
if KEYSTATE(31)=1 then move camera 1,-0.9
if leftkey()=1 then turn camera left 1,0.3
if rightkey()=1 then turn camera right 1, 0.3
sync
loop
_setup:
// set up screen
set display mode 1280,800,32
hide mouse
set window off
// load map and setup camera
load object "acmap.x",1
fog on
backdrop on
color backdrop rgb(0,0,0)
Make Camera 1
make object cube 2,10
// make camera follow player
//load gun
load object "media\H-MP5-Static.x",3
position object 3,0,0,1
lock object on 3
return
Also, I was wondering about shooting, I've heard many different methods used for shooting but I do not know which way is the best or how to do some of them. I know I could use objects with arrays to shoot. Or use sparky's DLL to use raycasting, but I don't know how to use raycasting.
Finally, I can't seem to get the camera to follow my player(a cube) I've tried different commands and spent a couple hours trying to get it to work but to no avail.
Any help/advice would be awesome!
*note* I'm trying to keep from asking for code so if at all possible please explain in detail. You don't have to but it would be awesome
Image thanks goes to AndrewT