View unanswered posts | View active topics It is currently Tue Oct 01, 2024 7:42 pm



Reply to topic  [ 7 posts ] 
 More than one type of ammo 
Author Message
User avatar

Joined: Wed Dec 02, 2009 8:03 pm
Posts: 11
Reply with quote
Post More than one type of ammo
Is there a way of shooting more than one type of ammo out of a gun other than Tracer rounds
So a single gun could fire *maybe* 3 different types of ammo in one shot instead of the tracer being every two shots

Knowledge wanted XD


Mon Dec 07, 2009 8:06 pm
Profile
User avatar

Joined: Sun Aug 09, 2009 9:26 am
Posts: 1633
Reply with quote
Post Re: More than one type of ammo
Look at the code for the mauler shotgun, I think it fires 2 kinds in one shot.


Mon Dec 07, 2009 9:35 pm
Profile
User avatar

Joined: Fri Feb 15, 2008 8:54 pm
Posts: 92
Location: New England
Reply with quote
Post Re: More than one type of ammo
Yes and no.

Yes it's possible, but you're going to need to learn some lua first.


Mon Dec 07, 2009 9:36 pm
Profile
User avatar

Joined: Wed Dec 02, 2009 8:03 pm
Posts: 11
Reply with quote
Post Re: More than one type of ammo
Darnation is LUA much hareder and if so can you link me up to a post with some dowloadable lua scripts

ty XD


Mon Dec 07, 2009 9:45 pm
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: More than one type of ammo
The Cling Clang wrote:
Yes it's possible, but you're going to need to learn some lua first.
What? You just need to get a gun that shoots an explosive the blows up instantly, with the ammo you want as gibs. Or an emitter, but the emitter has a chance to hit yourself if you're moving too fast.


Tue Dec 08, 2009 12:09 am
Profile WWW
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: More than one type of ammo
I realize you wanted to do this yourself, but I could not resist implementing it.

Image

There are obviously many way of doing this. The method I chose keeps track of the ID of the actor that fires the weapon so the script knows which type of bullet is next for each gun. Using the ID is not perfect since it can change at any time, but this is not a serious problem here. One benefit of tracking the actor is that we can implement a recoil system that makes automatic fire gradually more inaccurate.

Anyone is free to use this:
Attachment:
MultiShot_v1.zip [4.75 KiB]
Downloaded 121 times

This is only a demonstration so there is plenty of room for improvements though.


Tue Dec 08, 2009 10:29 am
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: More than one type of ammo
Oh right. I misunderstood the OP.


Tue Dec 08, 2009 11:25 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.032s | 15 Queries | GZIP : Off ]