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.

The 20 Line Challenge / Fps weapons switcher

Author
Message
Kequor
15
Years of Service
User Offline
Joined: 6th Feb 2004
Location: United States
Posted: 12th Mar 2004 03:34 Edited at: 12th Mar 2004 03:38
A simple programm to switch weapons in a FPS.



Dont worry and keep a cool head.
Kequor
15
Years of Service
User Offline
Joined: 6th Feb 2004
Location: United States
Posted: 12th Mar 2004 03:37
Tell me what you think.

Dont worry and keep a cool head.
dark coder
16
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 12th Mar 2004 12:58 Edited at: 12th Mar 2004 13:00
sweet gesus that must have been hard to code :-P

however if you have 10 guns it will be unifficient,

also you may need to load the guns 1st

also this is the "20liner" area so it means lil demos that are 20 lines or less, not weapons switching

Kequor
15
Years of Service
User Offline
Joined: 6th Feb 2004
Location: United States
Posted: 12th Mar 2004 17:09
I didn't know that. This was intended to be put in a game already in progress. Sorry.

Dont worry and keep a cool head.
Kequor
15
Years of Service
User Offline
Joined: 6th Feb 2004
Location: United States
Posted: 12th Mar 2004 17:12
Load object "your guns name",1
Load object "your other guns name",2
Hide object 2
do
if inkey$()="1" then show object 1: hide object 2
if inkey$()="2" then show object 2: hide object 1
loop

Dont worry and keep a cool head.
Kequor
15
Years of Service
User Offline
Joined: 6th Feb 2004
Location: United States
Posted: 12th Mar 2004 17:13
Tell me is that good or bad for 7 lines?

Dont worry and keep a cool head.
dark coder
16
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 12th Mar 2004 17:53
you will need, sync on

and sync before loop

else it will be really juggy

and also autocam off may be better, as you will just see the guns infront of you else and if there different sizes it may mess up

Kequor
15
Years of Service
User Offline
Joined: 6th Feb 2004
Location: United States
Posted: 12th Mar 2004 20:35
Okay heres my entry.

sync on
sync rate 30
autocam off
Load object "your guns name",1
Load object "your other guns name",2
Hide object 2
do
if inkey$()="1" then show object 1: hide object 2
if inkey$()="2" then show object 2: hide object 1
sync
loop

Dont worry and keep a cool head.
dark coder
16
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 12th Mar 2004 21:56
good

Kequor
15
Years of Service
User Offline
Joined: 6th Feb 2004
Location: United States
Posted: 13th Mar 2004 06:38
Think this will win?

Dont worry and keep a cool head.
Dark Serpent
15
Years of Service
User Offline
Joined: 24th Feb 2004
Location: U.S.A.
Posted: 16th Mar 2004 00:02
I have my doubts I mean I got Darkbasic a month ago and I fgured that out on the second day I had it.

I'm exited in boresville....what does that tell you?
dark coder
16
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 16th Mar 2004 02:11
good support there sepant, we need more like you then the place will florish

Dark Serpent
15
Years of Service
User Offline
Joined: 24th Feb 2004
Location: U.S.A.
Posted: 23rd Mar 2004 05:45
Oopps sorry. I didn't know you where a newbie like me. Besides I have to thank Dark coder anyway because I only figured it out because of a post that he responded to. If your not a newbie then I apologize in advance.

Yo
Kequor
15
Years of Service
User Offline
Joined: 6th Feb 2004
Location: United States
Posted: 23rd Mar 2004 17:07
I geuss I'm a newbie to programming because I'v only had Darkbasic for a few weeks.

Dont worry and keep a cool head.
Tomy
15
Years of Service
User Offline
Joined: 25th Dec 2003
Location:
Posted: 29th Mar 2004 10:11
Kequor wrote:
Quote: "Think this will win?
"


....
1. The 20-line-challenge is down meaning nobody's gonna win!
2. Maybe have a look at previous entries. Here's a good example:
http://www.thegamecreators.com/?m=forum_view&t=17676&b=11
3. I don't think that was a serious question, was it?
Kequor
15
Years of Service
User Offline
Joined: 6th Feb 2004
Location: United States
Posted: 9th Apr 2004 03:01
Of course not.

Dont worry and keep a cool head.
Kequor
15
Years of Service
User Offline
Joined: 6th Feb 2004
Location: United States
Posted: 9th Apr 2004 03:04
Okay its eleven lines.

Dont worry and keep a cool head.
muscles
15
Years of Service
User Offline
Joined: 12th Apr 2004
Location:
Posted: 12th Apr 2004 23:59
the code's not bad, but you'll need something more efficient if you add more guns (y'know, more than 2)
for your hide statements you could use a "for" loop that steps through and hides every gun, then shows one the active one afterward.
something like:
if inkey$() = 1
for t = 1 to "total number of guns"
hide object t
next t
show object 1
if inkey$() = 2 ...
Kequor
15
Years of Service
User Offline
Joined: 6th Feb 2004
Location: United States
Posted: 13th Apr 2004 02:19
In know but if I made a lot more guns it would be more than twenty lines. IUt serves its purpose with two.

Dont worry and keep a cool head.
Tomy
15
Years of Service
User Offline
Joined: 25th Dec 2003
Location:
Posted: 14th Apr 2004 03:57
it still doesn't fit the rules:

Quote: "3) External media is allowed but must be supplied for download or your post will be deleted."



GameVisions Softwares - http://www.gamevisions.cbj.net
dark coder
16
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 14th Apr 2004 04:36
but the 20 liner is basically dormant now, so i doubt theres any one checking here to delete it

@ muscles theres still a more efficient way than that

Login to post a reply

Server time is: 2019-09-23 04:01:49
Your offset time is: 2019-09-23 04:01:49