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 / how do you do this?

Author
Message
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 17th Sep 2003 04:53
if you wanted to make a 1st person shooter game (Quake, Doom, Halo, etc.) that is single player (so you dont have to make a object for the player) so you just position the gun1 in the center of the screen, and you want it to beable to switch the gun when you press buttons 1-3, how would you do it?.
would you do something like this?: (this isnt actual code, i am just learning DB and i cant remember all the commands right off the top of my head )

gun = 1
if keypress 1 then gun = 1 `if you push the [1] key
if keypress 2 then gun = 2
if keypress 3 then gun = 3
position object gun x,y,z `where ever

then you have the camera move when you press the arrows blah blah blah

is that how you would do it?

<{^_^<}
Falelorn
21
Years of Service
User Offline
Joined: 19th Jun 2003
Location: Canada
Posted: 17th Sep 2003 05:05
ya pretty much. Its a simple way to descibe it, but thats pretty close.

http://matedit.com/forums/index.php (other great DB forums)
Current Project - Legends of the Sword - On my WWW
Check out profile for more information
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 18th Sep 2003 08:07
ok, i tried that. just basicly. made a matrix, made an object (cyldr) and used the method in the 3d monster tutorial thing, for moving the object. and made it so when i pressed down, it changed from cyndr to cube, to sphere, then back to cyndr. using if var>3 then var=1 or something similar. but what it did was, when i pressed down. the cyndr froze where it was, then the cube started to move, then it just kept doing that. so i tried hiding the object, but then it disabled my left and right keys for some reason. i dont have code right now (its on the other computer) but ill get it tomarrow after i get home from school. but any help on what to do is welcomed!!

<{^_^<}
Toilet Freak
22
Years of Service
User Offline
Joined: 16th Dec 2002
Location: Australia
Posted: 18th Sep 2003 09:58
look at the iced demo, might help, save alot of explanation

DreamersScars-Toiletfreak-
If you need a animated chara go here... It isn't that great but it'll do as a tester model thingy http://users.tpg.com.au/users/cnkyk8k2/index.html
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 18th Sep 2003 15:05
just load all your gun models and put them in position then hide all but 1 of them, if they change weapons show the one the select and hide the old one


The Dark Padawan
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: USA!
Posted: 20th Sep 2003 16:33 Edited at: 20th Sep 2003 16:36
quote "look at the iced demo,might help,save alot of explanation"

or if your using DBC follow the tutorial on a simple FPS that helped me a ton!

"Nintendo GameCube is the best" and "DarkBasic is the best program for PC's"

Login to post a reply

Server time is: 2025-05-20 05:22:21
Your offset time is: 2025-05-20 05:22:21