Author Topic: Infection on death  (Read 3914 times)

For a dm I'm making with Cncwarlord and other people i need it so people once killed turn into something (player type) human -> monster.
If anyone can help We would be grateful.

Like so they become zombies or something?

This is very possible. But I do not have the time or patience to show you how, maybe later :P

Easy i think.

Code: [Select]
function GameConnection::SpawnPlayer(%this){
      Parent::SpawnPlayer(%this);
      %client.Monsterfy();
}

function GameConnection::Monsterfy(%this){
      if(isObject(%this.player))
      %this.hat = "0";
      %this.accent = "1";
      %this.pack = "0";
      %this.secondpack = "0";
      %this.chest = "0";
      %this.rarm = "0";
      %this.larm = "0";
      %this.hip = "0";
      %this.rleg = "0";
      %this.lleg = "0";
      %this.rhand = "0";
      %this.lhand = "0";
      %this.headcolor = "1 0.878 0.612 1";
      %this.hatcolor = "1 0.878 0.612 1";
      %this.accentcolor = "1 0.878 0.612 1";
      %this.packcolor = "1 0.878 0.612 1";
      %this.secondpackcolor = "1 0.878 0.612 1";
      %this.chestcolor = "1 0.878 0.612 1";
      %this.rarmcolor = "1 0.878 0.612 1";
      %this.larmcolor = "1 0.878 0.612 1";
      %this.rhandcolor = "1 0.878 0.612 1";
      %this.lhandcolor = "1 0.878 0.612 1";
      %this.hipcolor = "0.392 0.196 0.000 1";
      %this.rlegcolor = "1 0.878 0.612 1";
      %this.llegcolor = "1 0.878 0.612 1";
      %this.decalname = "AAA-None";
      %this.facename = "smiley";
      if(isObject(%this.player)){
         %this.ApplyBodyParts();
         %this.ApplyBodyColors();
   }
}

You can change those long numbers to what ever. At the momment it'll just make you naked with brown pants on.



That would not work the way im setting it up, I need to so the People who die become another player type.

Oh right yeah. Mine'll do it to everyone who spawns. Hang on ill make it for only people who die.

Code: [Select]
function GameConnection::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc){
%client.MonsterfyPls = 1;
Parent::OnDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc)
}

function GameConnection::SpawnPlayer(%this){
      Parent::SpawnPlayer(%this);
if(%client.MonsterfyPls){
      %client.Monsterfy();
}

function GameConnection::Monsterfy(%this){
      if(isObject(%this.player))
      %this.hat = "0";
      %this.accent = "1";
      %this.pack = "0";
      %this.secondpack = "0";
      %this.chest = "0";
      %this.rarm = "0";
      %this.larm = "0";
      %this.hip = "0";
      %this.rleg = "0";
      %this.lleg = "0";
      %this.rhand = "0";
      %this.lhand = "0";
      %this.headcolor = "1 0.878 0.612 1";
      %this.hatcolor = "1 0.878 0.612 1";
      %this.accentcolor = "1 0.878 0.612 1";
      %this.packcolor = "1 0.878 0.612 1";
      %this.secondpackcolor = "1 0.878 0.612 1";
      %this.chestcolor = "1 0.878 0.612 1";
      %this.rarmcolor = "1 0.878 0.612 1";
      %this.larmcolor = "1 0.878 0.612 1";
      %this.rhandcolor = "1 0.878 0.612 1";
      %this.lhandcolor = "1 0.878 0.612 1";
      %this.hipcolor = "0.392 0.196 0.000 1";
      %this.rlegcolor = "1 0.878 0.612 1";
      %this.llegcolor = "1 0.878 0.612 1";
      %this.decalname = "AAA-None";
      %this.facename = "smiley";
      if(isObject(%this.player)){
         %this.ApplyBodyParts();
         %this.ApplyBodyColors();
    }
  }
}

That would not work the way im setting it up, I need to so the People who die become another player type.
Notice the red text.

That will. Jeeze. I aint helping you again.

What that is doing is changing the look, I just need a simple script that will do it.

Yeah, You set the look how you want it to change them. Duh.

Yeah, You set the look how you want it to change them. Duh.
Its doom style , they look the same.

Code: [Select]
function GameConnection::onDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc){
%client.MonsterfyPls = !%client.MonsterfyPls;
Parent::OnDeath(%this, %sourceObject, %sourceClient, %damageType, %damLoc)
}

function GameConnection::SpawnPlayer(%this){
      Parent::SpawnPlayer(%this);
if(%client.MonsterfyPls){
      %client.Monsterfy();
}

function GameConnection::Monsterfy(%this){
      if(isObject(%this.player))
      %this.hat = "0";
      %this.accent = "1";
      %this.pack = "0";
      %this.secondpack = "0";
      %this.chest = "0";
      %this.rarm = "0";
      %this.larm = "0";
      %this.hip = "0";
      %this.rleg = "0";
      %this.lleg = "0";
      %this.rhand = "0";
      %this.lhand = "0";
      %this.headcolor = "1 0.878 0.612 1";
      %this.hatcolor = "1 0.878 0.612 1";
      %this.accentcolor = "1 0.878 0.612 1";
      %this.packcolor = "1 0.878 0.612 1";
      %this.secondpackcolor = "1 0.878 0.612 1";
      %this.chestcolor = "1 0.878 0.612 1";
      %this.rarmcolor = "1 0.878 0.612 1";
      %this.larmcolor = "1 0.878 0.612 1";
      %this.rhandcolor = "1 0.878 0.612 1";
      %this.lhandcolor = "1 0.878 0.612 1";
      %this.hipcolor = "0.392 0.196 0.000 1";
      %this.rlegcolor = "1 0.878 0.612 1";
      %this.llegcolor = "1 0.878 0.612 1";
      %this.decalname = "AAA-None";
      %this.facename = "smiley";
      if(isObject(%this.player)){
         %this.ApplyBodyParts();
         %this.ApplyBodyColors();
    }
  }
}

There. Sets it to NOT current type, so on-off-on-off...

So what would i have to change to make it go between Dhuman and Dcreature.

Thats what he's done.

Quote
Code: [Select]
%client.MonsterfyPls = !%client.MonsterfyPls;[/quote]