Data Realms Fan Forums
http://45.55.195.193/

Weapon fire mode
http://45.55.195.193/viewtopic.php?f=1&t=16158
Page 1 of 2

Author:  Munchkin9 [ Sun Aug 09, 2009 7:50 pm ]
Post subject:  Weapon fire mode

Don't know if this has been talked about before since it is rather hard to search for and I am pressed for time.

But would it be possible to attach (or whatever) a lua script to a weapon which would allow it to have different modes of firing (semi,auto etc) one possible way to do this would be to, at the press of a button, remove the currently held gun and replace it with a different one that looks the same but fires slightly differently. I can not try this out by cause of my pitiful lua skills but I was hoping someone more experienced might be able to give it a look.

-Munchkin

Author:  Disst [ Sun Aug 09, 2009 8:02 pm ]
Post subject:  Re: Weapon fire mode

viewtopic.php?f=61&t=14644

The assault rifle has a grenade launcher, if that's what you want.

Author:  Munchkin9 [ Sun Aug 09, 2009 9:04 pm ]
Post subject:  Re: Weapon fire mode

not to bad, but I was thinking more of a toggle change, you press the button once and it changes to semi, you press it again and it turns back to auto (or whatever, more accurately what i would like to do with this involves completely changing the type of shot fired not just the rate).

Author:  mail2345 [ Sun Aug 09, 2009 11:25 pm ]
Post subject:  Re: Weapon fire mode

Add a second global list to track state and add some toggle code, then done.

Author:  Munchkin9 [ Mon Aug 10, 2009 12:12 am ]
Post subject:  Re: Weapon fire mode

:)

read the first post mate my lua is "pitiful" I can't do that. I was hoping someone might be able to give me enough to go on to make myself (I am a quick learner but I don't really want to learn lua, I need enough space in my hard drive of a brain to remember my python...the coding language not the snake)

Author:  Spiritlol [ Tue Aug 11, 2009 10:39 pm ]
Post subject:  Re: Weapon fire mode

Couldn't you make 2 weapons, each with a different firemode, then on the purchase of the gun, you get 2 weapons, one with per say auto and the other semi. That way you switch weapons to "toggle" the mode. I know its not exactly what you mean but it can be done without lua.

Author:  Munchkin9 [ Tue Aug 11, 2009 10:53 pm ]
Post subject:  Re: Weapon fire mode

There are many problems with this method: Double the cost, double the weight, and, most importantly, this adds one more weapon which you need to switch between when trying to change to say grenades or something. It adds a lot of trouble. Doing it by lua would avoid this problem.

Author:  Spiritlol [ Tue Aug 11, 2009 11:05 pm ]
Post subject:  Re: Weapon fire mode

True it does add more weapons to switch through, but you can make the 2nd rate cost 0, and weight 0.

Author:  Ramma [ Wed Aug 12, 2009 1:09 am ]
Post subject:  Re: Weapon fire mode

Except the second gun would have it's own ammo count.

Author:  Geti [ Wed Aug 12, 2009 1:11 am ]
Post subject:  Re: Weapon fire mode

[quote="Munchkin9"]read the first post mate my lua is "pitiful" I can't do that.[quote]
well, nothing of the nature of what you want can be acomplished without scripting.

Author:  robolee [ Wed Aug 12, 2009 1:18 am ]
Post subject:  Re: Weapon fire mode

pffft come on you guys, make the gun shoot a mosrot called "tempshot" or whatever, add an luascript to the gun that makes "tempshot" 'turn into' the shot you want (copy velocity, rotation, position to the new round and remove "tempshot" from the scene), default it to mode 1 and when a button is released change to mode 2, when button released again go back to mode 1.

Author:  mail2345 [ Wed Aug 12, 2009 5:18 am ]
Post subject:  Re: Weapon fire mode

3POK_PHALE wrote:
http://www.datarealms.com/forum/viewtopic.php?f=61&t=14644

The assault rifle has a grenade launcher, if that's what you want.

Wadda think I did?

Author:  Disst [ Wed Aug 12, 2009 5:22 am ]
Post subject:  Re: Weapon fire mode

I think you probably mapped a key to fire an AEmitter that emits an MOSR explosive. Too lazy to look at the code right now, so I'm simply speculating.

Author:  411570N3 [ Wed Aug 12, 2009 8:10 am ]
Post subject:  Re: Weapon fire mode

Nope. He did exactly what robolee did except it becam a grenade when crouching.

Author:  Munchkin9 [ Wed Aug 12, 2009 4:37 pm ]
Post subject:  Re: Weapon fire mode

Am still looking for toggable

Quote:
well, nothing of the nature of what you want can be accomplished without scripting.


I am well aware of that which is why I was hoping someone would be interesting of creating a sort of base script of this or implement it into a weapon which I could then look at (with their permission) and use. Need I mention fame and fortune that would come from this :grin: ?

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/