View unanswered posts | View active topics It is currently Tue Jan 07, 2025 12:56 am



Reply to topic  [ 10 posts ] 
 Actors exploding when gun is fired? 
Author Message

Joined: Thu Nov 20, 2008 11:09 pm
Posts: 2
Reply with quote
Post Actors exploding when gun is fired?
Okay. Heres my pickle. I've been screwing around with some of the mods that I've downloaded by tweaking a setting here and there just to make them a bit more fun for me and my friend. Then I decided to start changing them alot more (making new sprites and changing ammo types) now I got the great idea of making a gun that shoots out dead bodies (or alive ones if i change the health back to 100) but now... whenever i fire the gun the actor thats holding the gun just explodes! Sometimes I can get off a shot without anything bad happening, but all other times the actor just goes poof. What I'm mostly looking for is any suggestions on variables or something that i can change to stop this from happening. I did manage to get it to stop by changing the mass of the body to 2, but this just ruins all purpose of the gun. Any ideas?


Thu Nov 20, 2008 11:19 pm
Profile
User avatar

Joined: Tue Oct 14, 2008 11:07 pm
Posts: 112
Reply with quote
Post Re: Actors exploding when gun is fired?
You seem to know that your problem is recoil. Shooting a soldier will have harmful effects (to put it lightly) if the shooter is a soldier of the same weight. The solution I would reccomend is that instead of shooting the body directly, have the gun shoot a low-mass TDExplosive with a low TriggerDelay. Make this TDExplosive gib into the body, and have the body inherit the explosive's velocity.

Full mass-based destruction, recoil drastically reduced.


Thu Nov 20, 2008 11:30 pm
Profile
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Re: Actors exploding when gun is fired?
Comment wrote:
You seem to know that your problem is recoil. Shooting a soldier will have harmful effects (to put it lightly) if the shooter is a soldier of the same weight. The solution I would reccomend is that instead of shooting the body directly, have the gun shoot a low-mass TDExplosive with a low TriggerDelay. Make this TDExplosive gib into the body, and have the body inherit the explosive's velocity.

Full mass-based destruction, recoil drastically reduced.

Actually, here's a much cleaner way to go about it:

1 - Have the gun fire a light AEmitter at a velocity of 1
2 - Give the emitter a very short LifeTime, like 100, and make it so it emits your desired projectile. Set the ParticlesPerMinute to 1, BurstSize to however many of the projectiles you want to come out (probably 1 in this case), and set BurstScale and BurstTriggered both to 1. Make sure the MinVelocity and MaxVelocity are both set to the velocity at which you want the projectile to go.

If you don't know how to do all that... uh, somebody else can tell you.


Thu Nov 20, 2008 11:31 pm
Profile YIM
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Actors exploding when gun is fired?
Darlos9D wrote:
Actually, here's a much cleaner way to go about it:

How is that any "cleaner"?

Because it makes the particles at the point of muzzle instead of somewhat further, or is it something else?

Also with this emitter method the particles don't end up retaining the actor's velocity in addition to their own, while a TDE gibbing could.


Thu Nov 20, 2008 11:52 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Actors exploding when gun is fired?
inheritsvel = 1?


Fri Nov 21, 2008 12:45 am
Profile WWW
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Re: Actors exploding when gun is fired?
Geti wrote:
inheritsvel = 1?

Does that work for emissions? I've been wondering that.

And hey, I'm just going by how the vanilla content is programmed. Like, thats how the coalition heavy sniper is done. And yes, its also cleaner due to the fact that the rounds actually come out of the muzzle. Or at least they look like it.


Last edited by Darlos9D on Fri Nov 21, 2008 1:59 am, edited 2 times in total.



Fri Nov 21, 2008 1:58 am
Profile YIM
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Actors exploding when gun is fired?
Geti wrote:
inheritsvel = 1?

Exactly. That can be done with a TDE's gib.
Doesn't work on emissions though. I just tried yesterday.


And authenticity because it's how vanilla content did it isn't really much of a benefit.
If another way works in a way more your favor, go for it.
I'm not necessarily saying the TDE way is better, just that it's also a valid option to consider, if velocity inheritance is important to the mod.
You could even attach an emitter to a TDE and do both ways at once, if both the effects together would be of any advantage to you.


Fri Nov 21, 2008 1:58 am
Profile

Joined: Thu Nov 20, 2008 11:09 pm
Posts: 2
Reply with quote
Post Re: Actors exploding when gun is fired?
Hey thanks everyone for the help! I tried Comment's way of doing it first because I still know nothing about emitters. Just to learn how everything works I used the Dummy Grenade Launcher as a template and went from there. It works perfectly! ^.^ Now all I have to work on is my own sprites and doing the weapon coding myself. Thanks again! I never would've thought of that on my own :P


Fri Nov 21, 2008 5:24 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Actors exploding when gun is fired?
If you just want to launch an actor, make your gun shoot a copy of the actor with -80 mass or so.

It'll make the torso weigh less and balance out the rest of the limbs. Might need some tweaking, but if the firevelocity is low enough, it'll work just fine.

Cleaner.


Sat Nov 22, 2008 1:26 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Actors exploding when gun is fired?
Yeah, but there isn't as much impact on targets when you do that.
It's a several kilogram projectile (over all) instead of the 100+ kg projectile a regular actor would be.

viewtopic.php?f=61&t=12488&p=234465&hilit=deadlauncher#p234465


Sat Nov 22, 2008 1:44 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 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.137s | 13 Queries | GZIP : Off ]