Data Realms Fan Forums
http://45.55.195.193/

How does the revolver cannon and such work?
http://45.55.195.193/viewtopic.php?f=1&t=23376
Page 1 of 3

Author:  Asklar [ Sun May 01, 2011 11:54 pm ]
Post subject:  How does the revolver cannon and such work?

There are some guns that fire an AEmitter that emits the actual round.
There are many guns that I've seen that work this way, so, how do they actually work?

Author:  dragonxp [ Mon May 02, 2011 12:04 am ]
Post subject:  Re: How does the revolver cannon and such work?

You shoot an AEmitter which shoots your round right after the AEmitter if fired.
Therefor bypassing any massive recoil.

Author:  Asklar [ Mon May 02, 2011 12:23 am ]
Post subject:  Re: How does the revolver cannon and such work?

I know how that part works, I mean, how does the coding part go?

I've tried many times, but they all end in fail, for example, once it could only shoot to the right, other time it shot in random directions, once it randomly emitted the round and any of the options before would happen next.

Author:  Coops [ Mon May 02, 2011 12:46 am ]
Post subject:  Re: How does the revolver cannon and such work?

AEmitters usually emit in relative of the direction they're headed. So if you make it shoot the AEmitter with at least a FireVelocity of 1 then it should emit in the direction you shot, other wise they will always emit to the right if they don't have a velocity.

Author:  Asklar [ Mon May 02, 2011 12:50 am ]
Post subject:  Re: How does the revolver cannon and such work?

Hm...
I'm going to try that, thanks.

Author:  Coops [ Mon May 02, 2011 2:35 am ]
Post subject:  Re: How does the revolver cannon and such work?

Nevermind that last post, I'm dumb.

AEmitters emit in the direction they are ROTATED. Not in the direction of their velocity.

Author:  Asklar [ Mon May 02, 2011 3:41 am ]
Post subject:  Re: How does the revolver cannon and such work?

What the...
The direction they are rotated? But...
I'll just go out and experiment, trial and error is one of the best ways to learn.

Author:  Kettenkrad [ Mon May 02, 2011 6:33 am ]
Post subject:  Re: How does the revolver cannon and such work?

Make sure OrientToVel = 1 and also that they have low spreads.

Author:  411570N3 [ Mon May 02, 2011 8:14 am ]
Post subject:  Re: How does the revolver cannon and such work?

Or you could use the gibs of a TDExplosive, which lets you make the bullets inherit velocity.

Author:  Asklar [ Mon May 02, 2011 11:54 pm ]
Post subject:  Re: How does the revolver cannon and such work?

But... but... I want to do it with emitters! =P

I mean, I know AEmitters are very versatile in ini coding, and that it is a very important part.
But, I have never found a guide for AEmitters (except templates) or learnt more of how they are used.

That's why I want to learn more about them.

Author:  411570N3 [ Tue May 03, 2011 7:27 am ]
Post subject:  Re: How does the revolver cannon and such work?

Using emitters lets you have varying initial speed projectiles while explosives let you have the velocity automatically inherit. It depends on what you want to do.

Author:  Coops [ Tue May 03, 2011 7:36 am ]
Post subject:  Re: How does the revolver cannon and such work?

AEmitters can work almost the exact same, just without the weapon status.

Author:  Nocifer [ Tue May 03, 2011 11:53 pm ]
Post subject:  Re: How does the revolver cannon and such work?

You could also just look at the code for the Revolver Cannon. That's what I've been doing for my massive-recoil weapons. Or just copy/paste, if you're lazy.

Author:  Asklar [ Wed May 04, 2011 12:11 am ]
Post subject:  Re: How does the revolver cannon and such work?

I did it once, but it failed horribly. I still can't get what is the thing that makes them work.

Author:  411570N3 [ Wed May 04, 2011 7:10 am ]
Post subject:  Re: How does the revolver cannon and such work?

If it's just one projectile you're firing, it's more efficient just to set the mass in Lua on Create(), and is much simpler to implement without problems.

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