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 / sorry for mass posts...need help with gun switching

Author
Message
Xarshi
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 1st Jan 2006 01:21
ok people.sorry about all the questions. i need to know,when you hava gun in an fps,how would you switch it.say,in like halo,you can only carry 2 guns.would you do like:
? if so, then ok.but my pc keeps overwriting stuff and its hard to get bad stuff out of my code because of is length now

HARK!
new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 1st Jan 2006 01:27
it seems right benny53. theres a better way but im too tires right now.

pleasy make a thread called "my questions" or something, and ask everything there.

Xarshi
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 1st Jan 2006 01:31
uh..sorry if this sounds rude but, forums are ment to have things posted and the poster not to be banished to only one topic. please tell me if thats the case and i will gladly leave

HARK!
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 1st Jan 2006 05:06 Edited at: 1st Jan 2006 05:07
You just make a variable to hold the current weapon selected and change that variable when the weapon changes. In the following code the current weapon variable is "CWeapon". This just uses text but you can make an array (or multiple arrays) to store everything about the weapon (bullets, clips, power level, and so on).

Edit: It uses the up and down arrow keys to change weapons.




new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 1st Jan 2006 18:09
well, thats what forums are, but not when the thread maker list is:

someone
benny53
benny53
benny53
dodic new improved
dodic new improved
someone
dodic new imporved
benny53
benny53
benny53
me
me
me
me
me
me
benny53
someone
someone

ok?

Xarshi
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 1st Jan 2006 20:45
ok. thanks grog. and db newbe, it doesnt matter how many posts their are on a forum.for as long as i can remember being on forums,i never once got told to stick to my own post. look at it this way,each day, you live in the world.think of the world as one giant forum. basicly what you are saying is go into your home and never come out into the world. now,would that sound fair? its not even the mods saying this,its a normal user who, got told this once i believe? did you ever do this? no. no you didnt. not as far as i can see. and personaly i believe that me and you post a lot both, so you are sorta being a hypocrite saying this. see my point? and by the way,thanks grog(again)

HARK!
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 1st Jan 2006 21:51
Np.


blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 1st Jan 2006 21:58
Benny53 has seven real questions, you, DB Newbe, have what I consider to be two 'real' threads out of your six. And even one of them has been duplicated into the WIP board.

Support the AAANJL by doing nothing! Visit teh site below..

Login to post a reply

Server time is: 2025-05-23 02:05:06
Your offset time is: 2025-05-23 02:05:06