Data Realms Fan Forums http://45.55.195.193/ |
|
how to create explodable units http://45.55.195.193/viewtopic.php?f=75&t=45282 |
Page 1 of 1 |
Author: | Izak12 [ Sun May 12, 2013 4:02 pm ] |
Post subject: | how to create explodable units |
im trying to make a zombies 2013 mod, but i want some of my zombies to explode on death, how do i do dis? |
Author: | uberhen [ Tue May 14, 2013 7:03 am ] |
Post subject: | Re: how to create explodable units |
I'm guessing you want the torso of the actor to explode once it's received enough damage? At the end of an actor's .ini file (the one with AddActor = AHuman), there should be a bunch of gibs defined like so: ^ This is for the coalition soldier. As far as I know, his torso doesn't explode when it gibs, since there aren't any velocity variables on the gibs. Now, let's take a look at the old blue clone: ^ For each MOPixel (single pixels, like blood, zombie green stuff, whatever), MOSParticle (sprites only collide using a single pixel defined at their spriteoffset, I think), and MOSRotating (sprites collide along their whole length, spriteoffset sets center of mass), there is a MaxVelocity and MinVelocity. They're relatively slow right now, all you would need to do in your code is bump these up to, say, 80 and 60 respectively. The "Count =" defines how many of each is created when the actor gibs, and the "Spread =" determines the degrees the multiple gibs will spread out once the actor is gibbed (IIRC, it's radians, so 2.25 = ~129 degrees. Google "x degrees to radians" to determine your value). "GibImpulseLimit" defines the amount of force, like a long drop or a craft crashing into the actor, before he will gib. "GibWoundLimit" determines how many wounds (from bullets, shrapnel, etc) the actor can have before he gibs. For example, if you want zombie blood to go splattering in all directions, use this: Code: AddGib = Gib GibParticle = MOPixel CopyOf = Zombie Blood <---- your blood's presetname here Count = 100 <---- how many pixels you want Spread = 6.28 <---- 360 degrees, they'll hit the ground too, so you may want to bump up the count value MaxVelocity = 80 <---- the maximum speed of the blood will be 80, uh... I forget what the unit is for CC MinVelocity = 60 <---- the minimum speed of the blood And if you want to have a sound play when the actor explodes, use the "GibSound =" lines from the coalition code I posted, and make the sound point to one you've already defined elsewhere. I'm still a little fuzzy, though. Check out this old post, lots of useful info there. Specifically section IVb, the Variables. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |