View unanswered posts | View active topics It is currently Fri Jan 10, 2025 8:10 am



Reply to topic  [ 14 posts ] 
 How Do you deal damage with a particle on hit 
Author Message
User avatar

Joined: Sun Jun 21, 2009 6:09 am
Posts: 12
Reply with quote
Post How Do you deal damage with a particle on hit
as the title says. how do you do that?

currently i have a gun that shoots an TDExplosive that explodes on hit on anything and shoots 36 particles in 360 degrees. and i want either the TDExplosive to deal 50 damage on hit or the individual particles to deal 3 damage on hit.

Burstdamage does not work since it is not an emitter.

p.s. sorry for poor punctuation and capitilazation, too lazy to do it atm (and spelling).


Tue Jul 14, 2009 3:38 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: How Do you deal damage with a particle on hit
that isnt how wounds work. you could do hacky stuff with lua, by casting rays, but if you dont really know how the wound system works, you should learn the basics before moving into scripting.


Tue Jul 14, 2009 3:57 am
Profile WWW
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: How Do you deal damage with a particle on hit
Cortex command isn't the kind of game where you have "Shotgun round 20 damage" or "Grenade Explosion 120 damage." Damage is based on the specific actor's wound types. So if you have an actor with 2 damage per wound, than you take 4 damage for 2 hits. If your actor has 0 damage set per wound, 50 bajillian bullets will cause no damage. And alot of lag.

Simply put, damage is based on wound types, not round/particles.


Tue Jul 14, 2009 4:39 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: How Do you deal damage with a particle on hit
Except for lua based hp damage weapons.


Tue Jul 14, 2009 5:01 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: How Do you deal damage with a particle on hit
I need to remember to add "Not Possible Except with Lua" to every explanation I do about ini coding.


Tue Jul 14, 2009 5:04 am
Profile
User avatar

Joined: Sun Jun 21, 2009 6:09 am
Posts: 12
Reply with quote
Post Re: How Do you deal damage with a particle on hit
Ok. Thanks for the information. i did not think particles could do damage on hit, but i thought you might be able to with the TDExplosive. I do have another question that might seem obvious but, if you have HitMOs = 1 on for TDExplosive that is shot from a gun... isnt it supposed to interact with the person it hits? because myn is not and i fear I'm making a obvious mistake but i have read the wiki and looked at other files and dont know why it wont interact with MOs (i even tried many different velocities).


Tue Jul 14, 2009 5:58 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: How Do you deal damage with a particle on hit
So you want the grenade to explode while coming out of the barrel of the gun?
That has to do with FireIgnoresThis being on or off, and where the MuzzleOffset is in relation to the barrel. If you want the grenade to explode on fire, set FireIgnoresThis to 0 and put the MuzzleOffset somewhere inside the gun.


Tue Jul 14, 2009 6:02 am
Profile
User avatar

Joined: Sun Jun 21, 2009 6:09 am
Posts: 12
Reply with quote
Post Re: How Do you deal damage with a particle on hit
No. what i want is for it to explode when it hits an MO. like an actor or a door. but altho i have HitMOs = 1 on. it just passes through them for some reason. At the moment it only explodes when hitting a wall or dirt. here is a bit of the code.

Code:
AddDevice = TDExplosive
   PresetName = Mass
   Mass = .1
   RestThreshold = -500
   HitsMOs = 1
   GetsHitByMOs = 1
   GlobalAccScalar = 0


it is called mass because I'm making a Mass Driver. (the emitted particles are supposed to give the push and i wanted them to do damage but i now know that is not possible unless i use lua which i might)


Tue Jul 14, 2009 6:09 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: How Do you deal damage with a particle on hit
Is the sprite visible? How fast is this thing going? If you have a null.bmp sprite, or a very small one, you will have collision problems, as well as if you have it going much more than 100.


Tue Jul 14, 2009 6:15 am
Profile
User avatar

Joined: Sun Jun 21, 2009 6:09 am
Posts: 12
Reply with quote
Post Re: How Do you deal damage with a particle on hit
I have varied the speeds and it has problems with all the speeds. it is currently 1*1 pixel. i have attempted with 10*10 but it had the same issues. I might just change over to using an AEmitter instead but i would prefer to keep it as TDExplosive because they do exactly what i want except for the fact that they are passing through MOs. i will try testing with the image being bigger and see if it works.


Tue Jul 14, 2009 6:23 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: How Do you deal damage with a particle on hit
Post your .rte, because you're clearly doing something wrong.

That said, 1x1 is no dice, it has to be at least 3x3 for reliable hit detection.


Tue Jul 14, 2009 6:48 am
Profile
User avatar

Joined: Sun Jun 21, 2009 6:09 am
Posts: 12
Reply with quote
Post Re: How Do you deal damage with a particle on hit
ok. so it does work with a 10*10. last time i tried with that i probably gave it a high velocity so it would just pass right by them. My bad. Thanks for the help and putting up with my idiotic questions.


Tue Jul 14, 2009 7:07 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: How Do you deal damage with a particle on hit
Quick tip: Use the variable "GibImpulseLimit = 0.01" to have an object explode on impact no matter how slow the TDExplosive goes.


Tue Jul 14, 2009 8:28 am
Profile
User avatar

Joined: Sun Jun 21, 2009 6:09 am
Posts: 12
Reply with quote
Post Re: How Do you deal damage with a particle on hit
Thanks Cricket. i have the impulse 1 which is enough because it's going at 100. I wish it to go faster but aparently 100 is the limit of positively hitting. i will lower it to .01 though because for some strange reason of a certain door at a certain angle in a certain way makes it richochet =\ so I'll do that in hopes of making it impulse'ible to ricochet (see that joke? it's funny... I hope).


Tue Jul 14, 2009 11:42 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 14 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.059s | 14 Queries | GZIP : Off ]