Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / first person shooter

Author
Message
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 31st Jan 2004 14:28
i need to know how to make a gun shoot and appear at the bottom of the screen like an ak-47
Doucan
21
Years of Service
User Offline
Joined: 26th Nov 2003
Location: Vermont USA
Posted: 31st Jan 2004 16:42
Be more specific:

1) Do you want it to actually shoot a projectile that can hit something, or are you just trying to get it to kick back and make a noise?

2) What do you mean by like an ak-47?

Doucan...

Completed Doucan movies: Doucan year of the Monkey, Doucan II: the revenge of Mortakia. Current project: Doucan movie DVD resoration. Progress: 20%
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 31st Jan 2004 19:12
yes i do want to shoot stuff and i meant the gun the ak-47, to shoot from
doffer
21
Years of Service
User Offline
Joined: 21st Nov 2003
Location:
Posted: 31st Jan 2004 19:36
In your userMANUAL there is a very good explination on how to make at firstperson shooter. Look in your tutorial folder, in the darkbasic folder.

To make your gun be position in the bottum of the screen, use the lock on object 1

Denmark Denmark Denmark.
spygamer
21
Years of Service
User Offline
Joined: 17th Oct 2003
Location:
Posted: 31st Jan 2004 22:28
Look at my new tutorial in the Work In Progress section, might help but still in progress.

I trying to be a moderator. I'm nice and cool 24/7.
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 31st Jan 2004 23:38
yea but i dont know where to put lock on object 1 could u tell me where i should put the code to load the gun you know like where to put it and what to write please because i cant get it under the screen like an fps

thanx in advance
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 31st Jan 2004 23:40
click on scource above to see my code you know the one with the triangle
doffer
21
Years of Service
User Offline
Joined: 21st Nov 2003
Location:
Posted: 1st Feb 2004 00:25
`load the gun
load object "gun.3ds/x",1
(rotate and scale them, so they fit your needs)
position object 1,0,-7,15
Lock object on 1

Denmark Denmark Denmark.
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 1st Feb 2004 00:38 Edited at: 1st Feb 2004 00:40
thanks doffer but ime a bit well a lot stupid so what do u mean rotate and scale them what does it mean and where should i put that in my code

*=========**=================*
*.-steve-.**.-slipknot rule-.*
*=========**=================*
doffer
21
Years of Service
User Offline
Joined: 21st Nov 2003
Location:
Posted: 1st Feb 2004 01:13
`load gun
load object "gun.x",1
yrotate object 1,90
scale object 1,50,50,50
position object 1,0,-7,15
lock object on 1

Yrotate, will rotate the object along the y-axe. In my example, I have rotated it 90 degrees. It may not be needed, if you object, face the direction it should.

Scale object, scales the object a given times. By this command, you can easely control the size of your object.

Denmark Denmark Denmark.
Travis
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location: West Aust.
Posted: 1st Feb 2004 03:28 Edited at: 1st Feb 2004 03:29
the loading and rotating commands should be put at the top of ur code when u make ur matrix before your main loop
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 1st Feb 2004 14:10
can you take a look at my code can u see anything wrong with it because it does not work the matrix and movement work but the gun is not there

*=========**=================*
*.-steve-.**.-slipknot rule-.*
*=========**=================*
himynameisali
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location: England, You...Rastards!
Posted: 1st Feb 2004 14:30
pardon me but can I copy the code?
I was looking for ages for the gun placing code!

maybe this will help irish fool:

`gun
load object "ak-47.3ds",1
yrotate object 1,90
scale object 1,50,50,50
position object 1,0,-7,15
lock object on 1

thats what could tell you

ali - nukesoft



Ali Morrison
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 1st Feb 2004 14:48
wll by far the easiest way, (i do this) is to position the gun in your 3d modeling program so it faces at the right agle rotation and everything, so all you have to do it position the gun at the cameras position & angle, then you can make all the guns the same withought having to rotate and scale them differently

steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 1st Feb 2004 14:52
do you see anything wrong with my code because it does not work properly, the gun does not appear at the bottom of the screen!

and yes you can copy my code if you wish (but it does not work).
ali - nukesoft

thanks in advance

*=========**=================*
*.-steve-.**.-slipknot rule-.*
*=========**=================*
spygamer
21
Years of Service
User Offline
Joined: 17th Oct 2003
Location:
Posted: 1st Feb 2004 15:42 Edited at: 1st Feb 2004 15:42
You forgot "Fix object pivot 1" after "yrotate object" hope that helps!

I trying to be a moderator. I'm nice and cool 24/7.

Login to post a reply

Server time is: 2025-06-04 01:53:52
Your offset time is: 2025-06-04 01:53:52