View unanswered posts | View active topics It is currently Mon Nov 19, 2018 11:31 pm



Reply to topic  [ 2 posts ] 
 how to create explodable units 
Author Message

Joined: Fri Dec 14, 2012 5:44 am
Posts: 201
Reply with quote
Post 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?


Sun May 12, 2013 4:02 pm
Profile
User avatar

Joined: Wed Jan 24, 2007 11:53 pm
Posts: 589
Location: Silicon Valley, California
Reply with quote
Post 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.


Tue May 14, 2013 7:03 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 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.019s | 13 Queries | GZIP : Off ]