PDA

View Full Version : Gib Spawner


DexterII
13th Nov 2001, 03:44 PM
Ok, I've been trying to do this for some time now but can't figure out one thing. I'm trying to make a Gib Spawner, an actor to spawn gibs. Now I made an actor to randomly pick gibs and spawn them, that part works perfect, but the fact is the gibs don't move. I tried setting the physics etc, can anyone give me pointers. Or does anone know where or in what script it is written that when you die and break up into gibs is written so maybe that will tell me how UT handles the gibs. Thx.

EasyRaider
13th Nov 2001, 04:55 PM
Hmm, I'm think you'll need to set the gibs' velocities. They won't just fly off all by themselves.

You might want to check out TMaleMasterChunk and InitVelocity() in UTCreatureChunks.

DexterII
13th Nov 2001, 05:52 PM
//=============================================================================
// GibSpawner.
//=============================================================================
class GibSpawner expands Effects;

Function PostBeginPlay()
{
Log("");
}

State() MaleGibs
{
Function Trigger( Actor Other, Pawn EventInstigator )
{
Local TMaleMasterChunk M;
Local Vector RandDir;

M = Spawn(Class'TMaleMasterChunk');
M.SetPhysics(PHYS_Falling);
RandDir = 700 * FRand() * VRand();
RandDir.Z = 200 * FRand() - 50;
M.Velocity = (0.2 + FRand()) * (other.Velocity + RandDir);
M.Velocity.X = Rand(10);
M.Velocity.Y = Rand(10);
}
}


Doesn't seem to move GRRRRR!!!!

EasyRaider
13th Nov 2001, 06:29 PM
Wish I could be of more help, but alas...