Data Realms Fan Forums http://45.55.195.193/ |
|
Firing an explosion out of a gun http://45.55.195.193/viewtopic.php?f=1&t=16068 |
Page 1 of 1 |
Author: | AGENT15 [ Fri Jul 31, 2009 8:25 pm ] |
Post subject: | Firing an explosion out of a gun |
I've made what is essentially an explosion cannon, but my current method of firing the debris/fire/etc is not working as well as I'd like. I've basically just got a grenade launcher that fires a shell very quickly with a minuscule delay, and all the shrapnel has InheritsVel = 1. The problem is that in close combat, the shell will occasionally bounce off a wall or person and end up just killing everyone, or sometimes just the firer. While funny, this is undesired. Is there a better way to go about having a gun fire more than just bullets at one time? |
Author: | MaximDude [ Fri Jul 31, 2009 8:26 pm ] |
Post subject: | Re: Firing an explosion out of a gun |
You can use an AEmitter. |
Author: | Shook [ Fri Jul 31, 2009 9:25 pm ] |
Post subject: | Re: Firing an explosion out of a gun |
Remove the "TriggerDelay" line entirely, that will likely shave off one frame. Alternatively, do that AEmitter thing that MaximDude suggested, though this will make the shots always travel at the same speed when fired, due to them not inheriting your own velocity. This method is used for the Coalition Heavy Sniper, so you can just look at that for a template. |
Author: | AGENT15 [ Mon Aug 03, 2009 4:55 am ] |
Post subject: | Re: Firing an explosion out of a gun |
Alright, I'll give that a whirl. Thanks! Shook wrote: though this will make the shots always travel at the same speed when fired, due to them not inheriting your own velocity. Actually, I meant that I gave the gibs a velocity inheritance, not the bomb. I'd prefer that the bomb not inherit my velocity EDIT: Wow I'm stupid. I changed the explosive to an emitter about a month ago, I just forgot I did so. Would there be any other way to lower it's time as a physical object, and make it explode at the exact moment I fire the weapon? Also, I just played around some more and I made the explosion over 33 milliseconds earlier, yay. |
Author: | Grif [ Mon Aug 03, 2009 11:32 pm ] |
Post subject: | Re: Firing an explosion out of a gun |
function Create(self) self:GibThis(); end Best you can do. |
Author: | AGENT15 [ Wed Aug 05, 2009 6:33 am ] |
Post subject: | Re: Firing an explosion out of a gun |
I don't know any lua. Could you please tell me how to use that code? |
Author: | Grif [ Wed Aug 05, 2009 6:35 am ] |
Post subject: | Re: Firing an explosion out of a gun |
Put that in <whateverscriptname>.lua, save it in your .rte. On your projectile, the actual particle (not the round) add this line: ScriptPath = your.rte/anyfolders/<whateverscriptname>.lua |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |