PDA

View Full Version : Dessecration of bodies?


WheatPuppet
27th Feb 2002, 10:12 AM
While bumbleing about in my reference folder I came upon a reference that was something like this:
if(Other.IsA('corpse'))
{
//do something
}
I don't really remember, it was 12:35 at night and I don't have the file on this computer, so I may have been halucinating.

Would it be possible to have a gun that shot corpses, causing them to explode... or maybe summon a Skaarj warrior?
If you can do this (it seems possible), could you do it to gibs or would it only work on an intact corpse?

What other perverted things could you do with a dead body in UT?

Kangus
27th Feb 2002, 11:38 AM
I made a gun that made corpses explode after a few seconds and that made pupae hatch out of them..... never finished due to a lack of bot support.... its tough to make bots shoot things that are not pawns.

Wormbo
27th Feb 2002, 11:40 AM
I didn't find any IsA('Corpse'), but I found "If ( Other.IsA('Carcass') ...":
class Mover extends Brush

...

function bool EncroachingOn( actor Other )
{
local Pawn P;
if ( Other.IsA('Carcass') || Other.IsA('Decoration') )
{
Other.TakeDamage(10000, None, Other.Location, vect(0,0,0), 'Crushed');
return false;
}
...

Nothing special about it. When the Mover hits the Carcass (basically everything thats dead :))... you can see the rest.

WheatPuppet
27th Feb 2002, 12:30 PM
Corpse, carcass, whatever.

Would it be possible to make a corpse-flinger gun? A gun that, when you shoot a carcass, would cause it to fling into the air and--upon contact with another surface--explode? That might be a really good joke weapon.

Smoke39
27th Feb 2002, 08:24 PM
You WILL see some kinda carcass shooting feature in at least one o' my mods now. >:)

WheatPuppet
27th Feb 2002, 11:13 PM
I'm glad that I am a source of inspiration. It might also be cool to have a Zombie Gun that spawns a one-time-use freindly-team spawnpoint on the targetted dead body.
For example, let's say that we are playing UT CTF, let's also say there is a player... let's call him Wormbo... playing for blue. Now Wormbo has the misfortune of being killed by a player of the red team... RamdoleKang. RamdoleKang, being the intelligent and strategy-minded player, then shoots the corpse with the Zombie Gun, placing a one-time-use freindly spawn. Now the next person to respawn on RamdoleKang's team would spawn over the dead body of Wormbo, in the process removing the dead body in a flash of light and snazzy particle effects. This would only work for the next player killed on the friendly side; no further players could spawn from that point (unless another player... like Wormbo... dies there).
Maybe you could even use it on friendly players, meaning that the next person to die on your own team would respawn over your fallen comrade's carcass. Although, I bet if the killed player waited for a few seconds while another player zombified his corpse, he could spawn into that spot again and keep fighting... Not that an armorless, weaponless goon would be much help.
Such a weapon would also be useful in 4-team domination maps where there are only 3 capture points.
The possibilities seem endless.

The names and actions of the above story are purely fictional. Any reseblance to actual events or persons is purely coincedental. ;)

BTW-- Wormbo, is there more beyond what you posted in the EncroachingOn function? I notice that there is (local Pawn P) which isn't used in the code, it seems like a strange thing to spasmatically insert...

Call me Erdrik
28th Feb 2002, 09:04 AM
just do a tracehit from the weapon then:


local var PlayerStart Spot;
if (HitActer.IsA('Carcass') )
{
Spot = Spawn(class'PlayerStart',,,HitLocation);
Spot.Team = Pawn(Owner).PlayerReplicationInfo.Team
//Im not sure the exact name of the team property in PlayerStart
HitActor.TakeDamage(10000, None, HitActor.Location, vect(0,0,0), 'Crushed');
}


you'll then need to set it as the next spawn point.... tho Im not sure how as I've not got alot of experience with Player spawning :p Also not sure how spawning a PlayerStart in the middle of a game would effect the BotPathing

Wormbo
28th Feb 2002, 12:03 PM
Sure, there's more in that function:// Return true to abort, false to continue.
function bool EncroachingOn( actor Other )
{
local Pawn P;
if ( Other.IsA('Carcass') || Other.IsA('Decoration') )
{
Other.TakeDamage(10000, None, Other.Location, vect(0,0,0), 'Crushed');
return false;
}
if ( Other.IsA('Fragment') || (Other.IsA('Inventory') && (Other.Owner == None)) )
{
Other.Destroy();
return false;
}

// Damage the encroached actor.
if( EncroachDamage != 0 )
Other.TakeDamage( EncroachDamage, Instigator, Other.Location, vect(0,0,0), 'Crushed' );

// If we have a bump-player event, and Other is a pawn, do the bump thing.
P = Pawn(Other);
if( P!=None && P.bIsPlayer )
{
if ( PlayerBumpEvent!='' )
Bump( Other );
if ( (MyMarker != None) && (P.Base != self)
&& (P.Location.Z < MyMarker.Location.Z - P.CollisionHeight - 0.7 * MyMarker.CollisionHeight) )
// pawn is under lift - tell him to move
P.UnderLift(self);
}

// Stop, return, or whatever.
if( MoverEncroachType == ME_StopWhenEncroach )
{
Leader.MakeGroupStop();
return true;
}
else if( MoverEncroachType == ME_ReturnWhenEncroach )
{
Leader.MakeGroupReturn();
if ( Other.IsA('Pawn') )
{
if ( Pawn(Other).bIsPlayer )
Pawn(Other).PlaySound(Pawn(Other).Land, SLOT_Talk);
else
Pawn(Other).PlaySound(Pawn(Other).HitSound1, SLOT_Talk);
}
return true;
}
else if( MoverEncroachType == ME_CrushWhenEncroach )
{
// Kill it.
Other.KilledBy( Instigator );
return false;
}
else if( MoverEncroachType == ME_IgnoreWhenEncroach )
{
// Ignore it.
return false;
}
}



Oh well, so I'm on the blue team...

WheatPuppet
28th Feb 2002, 01:48 PM
Originally posted by Call me Erdrik
just do a tracehit from the weapon then:

...Also not sure how spawning a PlayerStart in the middle of a game would effect the BotPathing...

Good Point.
I wonder if you could do bot pathing dynamically too?
I know very little of UScript at this point, but it seems like everything is possible.