mirror of
https://github.com/PhantomGamesDevelopment/TWM2.git
synced 2026-01-19 19:44:47 +00:00
Delete Old Files
This commit is contained in:
parent
739d77d1e2
commit
fac8ec0e83
|
|
@ -1,241 +0,0 @@
|
|||
$zombie::detectDist = 9999;
|
||||
$zombie::FallDieHeight = -500;
|
||||
//$Zombie::TurningSpeed = 100;
|
||||
$Zombie::ForwardSpeed = 750;
|
||||
$Zombie::FForwardSpeed = 1500;
|
||||
$Zombie::LForwardSpeed = 4000;
|
||||
$Zombie::DForwardSpeed = 1200;
|
||||
$Zombie::RForwardSpeed = 1500;
|
||||
|
||||
//************************************************************
|
||||
//*******************MISC Zomb Functions**********************
|
||||
//************************************************************
|
||||
|
||||
function ZSetRandomMove(%zombie){
|
||||
if (!isobject(%zombie))
|
||||
return;
|
||||
%RX = getrandom(-10, 10);
|
||||
%RY = getrandom(-10, 10);
|
||||
%RZ = "0";
|
||||
%vector = %RX@" "@%RY@" "@%RZ;
|
||||
%zombie.direction = vectornormalize(%vector);
|
||||
%zombie.Mnum = getrandom(1, 20);
|
||||
%zombie.zombieRmove = schedule(500, %zombie, "ZrandommoveLoop", %zombie);
|
||||
}
|
||||
|
||||
function ZrandommoveLoop(%zombie){
|
||||
if (!isobject(%zombie))
|
||||
return;
|
||||
if (%Zombie.getState() $= "dead")
|
||||
return;
|
||||
if (%zombie.hastarget == 1){
|
||||
%zombie.direction = "";
|
||||
return;
|
||||
}
|
||||
if (%zombie.Mnum >= 1){
|
||||
%X = getword(%zombie.direction, 1);
|
||||
%Y = (getword(%zombie.direction, 0) * -1);
|
||||
%none = 0;
|
||||
%vector = %X@" "@%Y@" "@%none;
|
||||
%zombie.setRotation(fullrot("0 0 0",%vector));
|
||||
if(%zombie.type == 1)
|
||||
%speed = ($zombie::forwardspeed);
|
||||
else if(%zombie.type == 2)
|
||||
%speed = ($zombie::Fforwardspeed * 0.6);
|
||||
else if(%zombie.type == 4)
|
||||
%speed = ($zombie::Dforwardspeed * 0.75);
|
||||
else if(%zombie.type == 3)
|
||||
%speed = ($zombie::Lforwardspeed * 0.8);
|
||||
%vector = vectorscale(%zombie.direction, %speed);
|
||||
%zombie.applyimpulse(%zombie.getposition(), %vector);
|
||||
%zombie.Mnum = (%zombie.Mnum - 1);
|
||||
%zombie.zombieRmove = schedule(500, %zombie, "ZrandommoveLoop", %zombie);
|
||||
}
|
||||
else if(%zombie.Mnum == 0)
|
||||
%zombie.zombieRmove = schedule(100, %zombie, "ZSetRandomMove", %zombie);
|
||||
}
|
||||
|
||||
function InfectLoop(%obj){
|
||||
if($TWM::PlayingHellJump) {
|
||||
return;
|
||||
}
|
||||
if (%obj.getState() $= "dead") {
|
||||
return;
|
||||
}
|
||||
if(!%obj.infected || %obj.isboss) {
|
||||
return;
|
||||
}
|
||||
if(%obj.client !$= "") {
|
||||
if(%obj.client.isActivePerk("No-Infect Armor")) {
|
||||
%obj.playShieldEffect("1 1 1");
|
||||
%obj.infected = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(isObject(%obj)){
|
||||
if(%obj.beats $= "")
|
||||
zombieAttackImpulse(%obj,0);
|
||||
if(%obj.beats < 15)
|
||||
%obj.setWhiteOut(%obj.beats * 0.05);
|
||||
else
|
||||
%obj.setDamageFlash(1);
|
||||
if(%obj.beats == 15){
|
||||
%obj.canZkill = 1;
|
||||
}
|
||||
if(%obj.beats >=15)
|
||||
serverPlay3d("ZombieMoan",%obj.getWorldBoxCenter());
|
||||
else if (%obj.beats >= 10)
|
||||
playDeathCry(%obj);
|
||||
else
|
||||
playPain(%obj);
|
||||
if(%obj.beats == 20){
|
||||
if($host::canZombie $= "")
|
||||
$host::canZombie = 0;
|
||||
if($host::canZombie == 1)
|
||||
makePersonZombie(%obj.getTransform(),%obj.client);
|
||||
else
|
||||
%obj.damage(0, %obj.getposition(), 10.0, $DamageType::Zombie);
|
||||
return;
|
||||
}
|
||||
%obj.beats++;
|
||||
%obj.infectedDamage = schedule(2000, %obj, "InfectLoop", %obj);
|
||||
}
|
||||
}
|
||||
|
||||
function Zsetjump(%zombie){
|
||||
%zombie.canjump = 1;
|
||||
}
|
||||
|
||||
//************************************************************
|
||||
//*****************Zomb Attack Stuff**************************
|
||||
//************************************************************
|
||||
|
||||
function ChargeEmitter(%zombie){
|
||||
if(!isobject(%zombie))
|
||||
return;
|
||||
if(%zombie.chargecount >= 2){
|
||||
%charge2 = new ParticleEmissionDummy()
|
||||
{
|
||||
position = %zombie.getMuzzlePoint(6);
|
||||
dataBlock = "defaultEmissionDummy";
|
||||
emitter = "burnEmitter";
|
||||
};
|
||||
MissionCleanup.add(%charge2);
|
||||
%charge2.schedule(100, "delete");
|
||||
}
|
||||
if(%zombie.chargecount <= 7){
|
||||
%charge = new ParticleEmissionDummy()
|
||||
{
|
||||
position = %zombie.getMuzzlePoint(5);
|
||||
dataBlock = "defaultEmissionDummy";
|
||||
emitter = "burnEmitter";
|
||||
};
|
||||
MissionCleanup.add(%charge);
|
||||
%charge.schedule(100, "delete");
|
||||
}
|
||||
if(%zombie.chargecount <= 9){
|
||||
%zombie.Fire = schedule(100, %zombie, "ChargeEmitter", %zombie);
|
||||
%zombie.chargecount++;
|
||||
}
|
||||
else
|
||||
%zombie.chargecount = 0;
|
||||
}
|
||||
|
||||
|
||||
//************************************************************
|
||||
//*******************Zomb AI Stuff****************************
|
||||
//************************************************************
|
||||
|
||||
function ZombieLookforTarget(%zombie){
|
||||
if(!isObject(%zombie)) {
|
||||
return;
|
||||
}
|
||||
%wbpos = %zombie.getworldboxcenter();
|
||||
%z = getWord(%wbpos, 2);
|
||||
if(%z < $zombie::FallDieHeight) {
|
||||
%zombie.scriptKill(0);
|
||||
}
|
||||
%count = ClientGroup.getCount();
|
||||
%closestClient = -1;
|
||||
%closestDistance = 32767;
|
||||
for(%i = 0; %i < %count; %i++)
|
||||
{
|
||||
%cl = ClientGroup.getObject(%i);
|
||||
if(isObject(%cl.player)){
|
||||
%testPos = %cl.player.getWorldBoxCenter();
|
||||
%distance = vectorDist(%wbpos, %testPos);
|
||||
if (%distance > 0 && %distance < %closestDistance && canAttackPlayer(%cl))
|
||||
{
|
||||
%closestClient = %cl;
|
||||
%closestDistance = %distance;
|
||||
}
|
||||
}
|
||||
}
|
||||
return %closestClient SPC %closestDistance;
|
||||
}
|
||||
|
||||
//conditionals, verifies that the zombies can attack this specific player
|
||||
function canAttackPlayer(%client) {
|
||||
if(!%client.player.isFTD && !%client.player.iszombie && !%client.player.stealthed && !%client.player.isGoingToDie) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function ZgetFacingDirection(%zombie,%closestClient,%pos){
|
||||
if(isObject(%closestClient)) {
|
||||
%clpos = %closestClient.getPosition();
|
||||
}
|
||||
else {
|
||||
%clpos = TWM2Lib_MainControl("RMPG");
|
||||
}
|
||||
%vector = vectorNormalize(vectorSub(%clpos, %pos));
|
||||
%v1 = getword(%vector, 0);
|
||||
%v2 = getword(%vector, 1);
|
||||
%nv1 = %v2;
|
||||
%nv2 = (%v1 * -1);
|
||||
%none = 0;
|
||||
%vector2 = %nv1@" "@%nv2@" "@%none;
|
||||
%zombie.setRotation(fullrot("0 0 0",%vector2));
|
||||
|
||||
return %vector;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
function getRandomZombieType(%list) {
|
||||
%count = getWordCount(%list);
|
||||
%choice = getRandom(0, %count);
|
||||
|
||||
%output = getWord(%list, %choice);
|
||||
if(%output $= "") {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return %output;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//DEATH
|
||||
datablock AudioProfile(ZombieDeathSound1)
|
||||
{
|
||||
filename = "voice/Derm3/avo.deathcry_01.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ZombieDeathSound2)
|
||||
{
|
||||
filename = "voice/Derm2/avo.deathcry_01.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ZombieDeathSound3)
|
||||
{
|
||||
filename = "voice/Derm1/avo.deathcry_01.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
|
@ -1,402 +0,0 @@
|
|||
$Zombie::RAAMThread = "cel1";
|
||||
//************************************************************
|
||||
//*****************Zomb Creation Stuff************************
|
||||
//************************************************************
|
||||
|
||||
function ZcreateLoop(%obj)
|
||||
{
|
||||
if(isObject(%obj))
|
||||
{
|
||||
if(%obj.timedout == 0){
|
||||
if(%obj.numZ <= 2 || %obj.numZ $= ""){
|
||||
ZPCreateZombie(%obj);
|
||||
if(%obj.numZ $= "")
|
||||
%obj.numZ = 0;
|
||||
%obj.numZ++;
|
||||
%obj.timedout = 1;
|
||||
schedule(10000, 0, "eval", ""@%obj@".timedout = 0;");
|
||||
}
|
||||
}
|
||||
%obj.ZCLoop = schedule(2000, 0, "ZcreateLoop", %obj);
|
||||
}
|
||||
}
|
||||
|
||||
//this is for when a ZSpawn spawns a zombie
|
||||
function ZPCreateZombie(%obj){
|
||||
if($Game::ZombieCount > $TWM2::MaxZombies || !$TWM2::CanSpawnZ) {
|
||||
return;
|
||||
}
|
||||
%Cpos = vectorAdd(%obj.getposition() , "0 0 4");
|
||||
if(%obj.Ztype $= ""){
|
||||
%obj.ZType = 1;
|
||||
}
|
||||
switch(%obj.ZType) {
|
||||
case 1:
|
||||
%Zombie = new player(){
|
||||
Datablock = "ZombieArmor";
|
||||
};
|
||||
%command = "Zombiemovetotarget";
|
||||
case 2:
|
||||
%Zombie = new player(){
|
||||
Datablock = "FZombieArmor";
|
||||
};
|
||||
%command = "FZombiemovetotarget";
|
||||
case 3:
|
||||
%Zombie = new player(){
|
||||
Datablock = "LordZombieArmor";
|
||||
};
|
||||
%Zombie.mountImage(ZHead, 3);
|
||||
%Zombie.mountImage(ZBack, 4);
|
||||
%Zombie.mountImage(ZDummyslotImg, 5);
|
||||
%Zombie.mountImage(ZDummyslotImg2, 6);
|
||||
%Zombie.setInventory(AcidCannon, 1, true);
|
||||
%Zombie.use(AcidCannon);
|
||||
%zombie.firstFired = 0;
|
||||
%zombie.canmove = 1;
|
||||
%command = "LZombiemovetotarget";
|
||||
case 4:
|
||||
%Zombie = new player(){
|
||||
Datablock = "DemonZombieArmor";
|
||||
};
|
||||
%zombie.mountImage(ZdummyslotImg, 4);
|
||||
%command = "DZombiemovetotarget";
|
||||
case 5:
|
||||
%Zombie = new player(){
|
||||
Datablock = "RapierZombieArmor";
|
||||
};
|
||||
%Zombie.mountImage(ZWingImage, 3);
|
||||
%Zombie.mountImage(ZWingImage2, 4);
|
||||
%zombie.setActionThread("scoutRoot",true);
|
||||
%command = "RZombiemovetotarget";
|
||||
case 6:
|
||||
DemonMotherCreate(%cPos);
|
||||
return;
|
||||
case 7 or 8:
|
||||
//Skip 7 (Yvex), and 8 (Lord-Rog)
|
||||
case 9:
|
||||
%Zombie = new player(){
|
||||
Datablock = "ShifterZombieArmor";
|
||||
};
|
||||
%command = "ShifterZombiemovetotarget";
|
||||
case 10:
|
||||
//the Z-Spawner cannot be permitted to spawn summoner zombies
|
||||
case 11:
|
||||
%Zombie = new player(){
|
||||
Datablock = "DemonZombieArmor";
|
||||
};
|
||||
%zombie.mountImage(ZSniperImage1, 4);
|
||||
%zombie.mountImage(ZSniperImage2, 5);
|
||||
%command = "SniperZombiemovetotarget";
|
||||
case 12:
|
||||
%Zombie = new player(){
|
||||
Datablock = "DemonUltraZombieArmor";
|
||||
};
|
||||
%command = "UDemonZombiemovetotarget";
|
||||
%zombie.NoHS = 1; //blocks HSs
|
||||
case 13:
|
||||
%Zombie = new player(){
|
||||
Datablock = "FZombieArmor";
|
||||
};
|
||||
%zombie.mountImage(ZExplosivePack, 4);
|
||||
%command = "VRavZombiemovetotarget";
|
||||
case 14:
|
||||
%Zombie = new player(){
|
||||
Datablock = "SSZombieArmor";
|
||||
};
|
||||
%zombie.mountImage(SSZombImage2, 4);
|
||||
%zombie.mountImage(SSZombImage3, 5);
|
||||
%command = "SSZombiemovetotarget"; //Damned Nazi Zombies!!! "SS"
|
||||
case 15:
|
||||
%Zombie = new player(){
|
||||
Datablock = "WraithZombieArmor";
|
||||
};
|
||||
%Zombie.setInventory(Mp26, 1, true);
|
||||
%Zombie.setInventory(Mp26Ammo, 999, true);
|
||||
%Zombie.use(Mp26);
|
||||
StartWraithAI(%Zombie);
|
||||
case 16:
|
||||
%Zombie = new player() {
|
||||
Datablock = "ROGZombieArmor";
|
||||
};
|
||||
%Zombie.NoHS = 1;
|
||||
%Zombie.isBoss = 1;
|
||||
|
||||
%zombie.mountImage(ZdummyslotImg, 4);
|
||||
%zombie.mountImage(ZMG42BaseImage, 5);
|
||||
%zombie.mountImage(ROGSAWImage1, 6);
|
||||
%zombie.mountImage(ROGSAWImage2, 7);
|
||||
%zombie.mountImage(ROGSAWImage3, 8);
|
||||
|
||||
%zombie.shotsfired = 0;
|
||||
RapierShieldApply(%zombie);
|
||||
%command = "GeneralRogmovetotarget";
|
||||
case 17:
|
||||
%Zombie = new player(){
|
||||
Datablock = "EliteDemonZombieArmor";
|
||||
};
|
||||
%zombie.mountImage(ZdummyslotImg, 4);
|
||||
%command = "EDZombiemovetotarget";
|
||||
default:
|
||||
%Zombie = new player(){
|
||||
Datablock = "ZombieArmor";
|
||||
};
|
||||
%command = "Zombiemovetotarget";
|
||||
}
|
||||
|
||||
|
||||
//Missions
|
||||
if(%obj.isInTheMission) {
|
||||
%zombie.isInTheMission = 1;
|
||||
}
|
||||
//
|
||||
|
||||
%zombie.type = %obj.Ztype;
|
||||
%Zombie.setTransform(%Cpos);
|
||||
%zombie.canjump = 1;
|
||||
%zombie.isZombie = 1;
|
||||
%zombie.HasCP = 1;
|
||||
|
||||
%Zombie.team = 30;
|
||||
%zname = $TWM2::ZombieName[%obj.ZType]; // <- To Hosts, Enjoy, You can
|
||||
//Change the Zombie Names now!!!
|
||||
%zombie.target = createTarget(%zombie, %zname, "", "Derm3", '', %zombie.team, PlayerSensor);
|
||||
setTargetSensorData(%zombie.target, PlayerSensor);
|
||||
setTargetSensorGroup(%zombie.target, 30);
|
||||
setTargetName(%zombie.target, addtaggedstring(%zname));
|
||||
setTargetSkin(%zombie.target, 'Horde');
|
||||
|
||||
$Game::ZombieCount++;
|
||||
|
||||
if(%obj.spawnTypeset == 1)
|
||||
%obj.numZ = 3;
|
||||
else
|
||||
%zombie.CP = %obj;
|
||||
%zombie.hastarget = 1;
|
||||
ZombieGroup.add(%Zombie);
|
||||
if(isSet(%command)) {
|
||||
schedule(1000, %zombie, %command, %zombie);
|
||||
}
|
||||
}
|
||||
|
||||
//This is for creation of a zombie at a location using the console
|
||||
function StartAZombie(%pos, %type){
|
||||
if(!isObject(Game)) {
|
||||
error("UE Blocked...");
|
||||
return -1;
|
||||
}
|
||||
if($Game::ZombieCount > $TWM2::MaxZombies || !$TWM2::CanSpawnZ) {
|
||||
return -1;
|
||||
}
|
||||
//
|
||||
if(%type $= "") {
|
||||
%type = 1;
|
||||
}
|
||||
if(%type == 7 || %type == 8 || %type <= 0) {
|
||||
%type = 1;
|
||||
}
|
||||
//
|
||||
if(%Type == 1){
|
||||
%Zombie = new player(){
|
||||
Datablock = "ZombieArmor";
|
||||
};
|
||||
%command = "Zombiemovetotarget";
|
||||
if(Game.CheckModifier("YouCantSeeMe") == 1) {
|
||||
%Zombie.setCloaked(true);
|
||||
}
|
||||
}
|
||||
if(%Type == 2){
|
||||
%Zombie = new player(){
|
||||
Datablock = "FZombieArmor";
|
||||
};
|
||||
%command = "FZombiemovetotarget";
|
||||
}
|
||||
if(%Type == 3){
|
||||
%Zombie = new player(){
|
||||
Datablock = "LordZombieArmor";
|
||||
};
|
||||
%zombie.client = $zombie::Lclient;
|
||||
%Zombie.mountImage(ZHead, 3);
|
||||
%Zombie.mountImage(ZBack, 4);
|
||||
%Zombie.mountImage(ZDummyslotImg, 5);
|
||||
%Zombie.mountImage(ZDummyslotImg2, 6);
|
||||
%Zombie.setInventory(AcidCannon, 1, true);
|
||||
%Zombie.use(AcidCannon);
|
||||
%zombie.firstFired = 0;
|
||||
%zombie.canmove = 1;
|
||||
%command = "LZombiemovetotarget";
|
||||
}
|
||||
if(%type == 4){
|
||||
%Zombie = new player(){
|
||||
Datablock = "DemonZombieArmor";
|
||||
};
|
||||
%zombie.mountImage(ZdummyslotImg, 4);
|
||||
%command = "DZombiemovetotarget";
|
||||
}
|
||||
if(%type == 5) {
|
||||
%Zombie = new player(){
|
||||
Datablock = "RapierZombieArmor";
|
||||
};
|
||||
%Zombie.mountImage(ZWingImage, 3);
|
||||
%Zombie.mountImage(ZWingImage2, 4);
|
||||
%zombie.setActionThread("scoutRoot",true);
|
||||
%command = "RZombiemovetotarget";
|
||||
}
|
||||
if(%type == 6) {
|
||||
return DemonMotherCreate(%pos);
|
||||
}
|
||||
//Skip 7 (Yvex), and 8 (Rog)
|
||||
if(%type == 9){
|
||||
%Zombie = new player(){
|
||||
Datablock = "ShifterZombieArmor";
|
||||
};
|
||||
%command = "ShifterZombiemovetotarget";
|
||||
}
|
||||
if(%type == 10){
|
||||
%Zombie = new player(){
|
||||
Datablock = "SummonerZombieArmor";
|
||||
};
|
||||
%command = "SummonerZombiemovetotarget";
|
||||
}
|
||||
if(%type == 11){
|
||||
%Zombie = new player(){
|
||||
Datablock = "DemonZombieArmor";
|
||||
};
|
||||
%zombie.mountImage(ZSniperImage1, 4);
|
||||
%zombie.mountImage(ZSniperImage2, 5);
|
||||
%command = "SniperZombiemovetotarget";
|
||||
}
|
||||
if(%type == 12){
|
||||
%Zombie = new player(){
|
||||
Datablock = "DemonUltraZombieArmor";
|
||||
};
|
||||
%command = "UDemonZombiemovetotarget";
|
||||
%zombie.NoHS = 1; //blocks HSs
|
||||
}
|
||||
if(%Type == 13){
|
||||
%Zombie = new player(){
|
||||
Datablock = "FZombieArmor";
|
||||
};
|
||||
%zombie.mountImage(ZExplosivePack, 4);
|
||||
%command = "VRavZombiemovetotarget";
|
||||
}
|
||||
if(%Type == 14){
|
||||
%Zombie = new player(){
|
||||
Datablock = "SSZombieArmor";
|
||||
};
|
||||
%zombie.mountImage(SSZombImage2, 4);
|
||||
%zombie.mountImage(SSZombImage3, 5);
|
||||
%command = "SSZombiemovetotarget"; //Damned Nazi Zombies!!! "SS"
|
||||
}
|
||||
if(%Type == 15){
|
||||
%Zombie = new player(){
|
||||
Datablock = "WraithZombieArmor";
|
||||
};
|
||||
%Zombie.isZombie = 1;
|
||||
%Zombie.setInventory(Mp26, 1, true);
|
||||
%Zombie.setInventory(Mp26Ammo, 999, true);
|
||||
%Zombie.use(Mp26);
|
||||
StartWraithAI(%Zombie);
|
||||
}
|
||||
if(%Type == 16) {
|
||||
%Zombie = new player() {
|
||||
Datablock = "ROGZombieArmor";
|
||||
};
|
||||
%Zombie.NoHS = 1;
|
||||
%Zombie.isBoss = 1;
|
||||
|
||||
%zombie.mountImage(ZdummyslotImg, 4);
|
||||
%zombie.mountImage(ZMG42BaseImage, 5);
|
||||
%zombie.mountImage(ROGSAWImage1, 6);
|
||||
%zombie.mountImage(ROGSAWImage2, 7);
|
||||
%zombie.mountImage(ROGSAWImage3, 8);
|
||||
|
||||
%zombie.shotsfired = 0;
|
||||
RapierShieldApply(%zombie);
|
||||
%command = "GeneralRogmovetotarget";
|
||||
}
|
||||
if(%type == 17){
|
||||
%Zombie = new player(){
|
||||
Datablock = "EliteDemonZombieArmor";
|
||||
};
|
||||
%zombie.mountImage(ZdummyslotImg, 4);
|
||||
%command = "EDZombiemovetotarget";
|
||||
}
|
||||
if(%type == 18) {
|
||||
%Zombie = new player(){
|
||||
Datablock = "RapierEliteZombieArmor";
|
||||
};
|
||||
%Zombie.mountImage(ZWingImage, 3, true, 'beagle');
|
||||
%Zombie.mountImage(ZWingImage2, 4, true, 'beagle');
|
||||
%zombie.setActionThread("scoutRoot",true);
|
||||
}
|
||||
|
||||
//
|
||||
if(!isObject(%zombie)) {
|
||||
echo("Zero zombie error, spawning normal");
|
||||
%type = 1;
|
||||
%zombie = new player(){
|
||||
Datablock = "ZombieArmor";
|
||||
};
|
||||
%command = "Zombiemovetotarget";
|
||||
if(Game.CheckModifier("YouCantSeeMe") == 1) {
|
||||
%zombie.setCloaked(true);
|
||||
}
|
||||
}
|
||||
|
||||
%Zombie.team = 30;
|
||||
%zname = $TWM2::ZombieName[%type]; // <- To Hosts, Enjoy, You can
|
||||
//Change the Zombie Names now!!!
|
||||
%zombie.target = createTarget(%zombie, %zname, "", "Derm3", '', %zombie.team, PlayerSensor);
|
||||
setTargetSensorData(%zombie.target, PlayerSensor);
|
||||
setTargetSensorGroup(%zombie.target, 30);
|
||||
setTargetName(%zombie.target, addtaggedstring(%zname));
|
||||
setTargetSkin(%zombie.target, 'Horde');
|
||||
//
|
||||
%zombie.type = %type;
|
||||
%Zombie.setTransform(%pos);
|
||||
%zombie.canjump = 1;
|
||||
%zombie.hastarget = 1;
|
||||
%zombie.isZombie = 1;
|
||||
ZombieGroup.add(%Zombie);
|
||||
|
||||
$Game::ZombieCount++;
|
||||
|
||||
if(isSet(%command)) {
|
||||
schedule(1000, %zombie, %command, %zombie);
|
||||
}
|
||||
return %zombie;
|
||||
}
|
||||
|
||||
//This is for when someone is killed by a zombie and spawns a new one
|
||||
function CreateZombie(%obj){
|
||||
if($Game::ZombieCount > $TWM2::MaxZombies || !$TWM2::CanSpawnZ || $TWM::PlayingInfection || $TWM::PlayingHorde || $TWM::PlayingHellJump) {
|
||||
return;
|
||||
}
|
||||
%Cpos = %obj.getposition();
|
||||
%Zombie = new player(){
|
||||
Datablock = "ZombieArmor";
|
||||
};
|
||||
%Zombie.setTransform(%Cpos);
|
||||
%zombie.type = 1;
|
||||
%zombie.canjump = 1;
|
||||
%zombie.hastarget = 1;
|
||||
%zombie.isZombie = 1;
|
||||
|
||||
%Zombie.team = 30;
|
||||
%zname = $TWM2::ZombieName[1]; // <- To Hosts, Enjoy, You can
|
||||
//Change the Zombie Names now!!!
|
||||
%zombie.target = createTarget(%zombie, %zname, "", "Derm3", '', %zombie.team, PlayerSensor);
|
||||
setTargetSensorData(%zombie.target, PlayerSensor);
|
||||
setTargetSensorGroup(%zombie.target, 30);
|
||||
setTargetName(%zombie.target, addtaggedstring(%zname));
|
||||
setTargetSkin(%zombie.target, 'Horde');
|
||||
|
||||
ZombieGroup.add(%Zombie);
|
||||
|
||||
//Phantom139 - new zombie stand up stuff :P
|
||||
%zombie.zapObject();
|
||||
revivestand(%zombie, 0);
|
||||
//end
|
||||
|
||||
schedule(1000, %zombie, "Zombiemovetotarget", %zombie);
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
datablock PlayerData(RapierEliteZombieArmor) : MediumMaleBiodermArmor {
|
||||
maxDamage = 3.0;
|
||||
minImpactSpeed = 50;
|
||||
speedDamageScale = 0.015;
|
||||
maxEnergy = 80;
|
||||
repairRate = 0.0033;
|
||||
energyPerDamagePoint = 75.0; // shield energy required to block one point of damage
|
||||
|
||||
rechargeRate = 0.256;
|
||||
jetForce = 25.22 * 130 * 1.5;
|
||||
underwaterJetForce = 25.22 * 130 * 1.5;
|
||||
underwaterVertJetFactor = 1.5;
|
||||
jetEnergyDrain = 1.0;
|
||||
underwaterJetEnergyDrain = 0.6;
|
||||
minJetEnergy = 1;
|
||||
maxJetHorizontalPercentage = 0.8;
|
||||
|
||||
boundingBox = "2.0 2.0 1.2";
|
||||
|
||||
damageScale[$DamageType::M1700] = 2.0;
|
||||
|
||||
max[RepairKit] = 0;
|
||||
max[Mine] = 0;
|
||||
max[Grenade] = 0;
|
||||
};
|
||||
|
||||
function RapierEliteAirstrike(%cl, %pos) {
|
||||
%offSet[0] = "700 0 100";
|
||||
%offSet[1] = "725 0 100";
|
||||
%offSet[2] = "750 0 100";
|
||||
|
||||
%player = %cl.player;
|
||||
if(!isObject(%player) || %player.getState() $= "dead") {
|
||||
return;
|
||||
}
|
||||
for(%i = 0; %i < 3; %i++) {
|
||||
%z = StartAZombie(vectorAdd(%pos, %offSet[%i]), 18);
|
||||
//issue move order
|
||||
}
|
||||
}
|
||||
|
||||
function RapierEliteDropAcidBomb(%zombie, %pos, %cl) {
|
||||
if(!isObject(%zombie) || %zombie.getState() $= "dead") {
|
||||
return;
|
||||
}
|
||||
%p = new (TracerProjectile)() {
|
||||
dataBlock = EliteRapierAcidBomb;
|
||||
initialDirection = "0 0 -5";
|
||||
initialPosition = %zombie.getPosition();
|
||||
sourceObject = %zombie;
|
||||
sourceSlot = 0;
|
||||
};
|
||||
%p.theClient = %cl;
|
||||
MissionCleanup.add(%p);
|
||||
if(isObject(%cl.player)) {
|
||||
%p.sourceObject = %cl.player;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
datablock PlayerData(FZombieArmor) : LightMaleBiodermArmor
|
||||
{
|
||||
maxDamage = 1.0;
|
||||
minImpactSpeed = 50;
|
||||
speedDamageScale = 0.015;
|
||||
|
||||
damageScale[$DamageType::M1700] = 2.0;
|
||||
|
||||
max[RepairKit] = 0;
|
||||
max[Mine] = 0;
|
||||
max[Grenade] = 0;
|
||||
};
|
||||
|
||||
function FZombiemovetotarget(%zombie){
|
||||
if(!isobject(%Zombie))
|
||||
return;
|
||||
if(%Zombie.getState() $= "dead")
|
||||
return;
|
||||
%pos = %zombie.getworldboxcenter();
|
||||
%closestClient = ZombieLookForTarget(%zombie);
|
||||
%closestDistance = getWord(%closestClient,1);
|
||||
%closestClient = getWord(%closestClient,0).Player;
|
||||
if(%closestDistance <= $zombie::detectDist){
|
||||
if(%zombie.hastarget != 1){
|
||||
%zombie.hastarget = 1;
|
||||
}
|
||||
%zombie.setActionThread("scoutRoot",true);
|
||||
%upvec = "250";
|
||||
%fmultiplier = $Zombie::FForwardSpeed;
|
||||
|
||||
//moanStuff
|
||||
%chance = (getrandom() * 50);
|
||||
if(%chance >= 49) {
|
||||
%chance = (getRandom() * 12);
|
||||
if(%chance <= 11)
|
||||
serverPlay3d("ZombieMoan",%zombie.getWorldBoxCenter());
|
||||
else
|
||||
serverPlay3d("ZombieHOWL",%zombie.getWorldBoxCenter());
|
||||
}
|
||||
|
||||
%vector = ZgetFacingDirection(%zombie,%closestClient,%pos);
|
||||
|
||||
//Move Stuff
|
||||
if(%closestDistance <= $zombie::lungDist && %zombie.canjump == 1 && getword(%vector, 2) <= "0.8" ){
|
||||
%zombie.setvelocity("0 0 0");
|
||||
%fmultiplier = (%fmultiplier * 2);
|
||||
%upvec = (%upvec * 3.5);
|
||||
%zombie.canjump = 0;
|
||||
schedule(2000, %zombie, "Zsetjump", %zombie);
|
||||
}
|
||||
%vector = vectorscale(%vector, %Fmultiplier);
|
||||
%x = Getword(%vector,0);
|
||||
%y = Getword(%vector,1);
|
||||
%z = Getword(%vector,2);
|
||||
if(%z >= "1200" && %zombie.canjump == 1){
|
||||
%zombie.setvelocity("0 0 0");
|
||||
%upvec = (%upvec * 8);
|
||||
%x = (%x * 0.5);
|
||||
%y = (%y * 0.5);
|
||||
%zombie.canjump = 0;
|
||||
schedule(2500, %zombie, "Zsetjump", %zombie);
|
||||
}
|
||||
|
||||
%vector = %x@" "@%y@" "@%upvec;
|
||||
%zombie.applyImpulse(%pos, %vector);
|
||||
}
|
||||
else if(%zombie.hastarget == 1){
|
||||
%zombie.hastarget = 0;
|
||||
%zombie.zombieRmove = schedule(100, %zombie, "ZSetRandomMove", %zombie);
|
||||
%zombie.setActionThread("ski",true);
|
||||
}
|
||||
%zombie.moveloop = schedule(500, %zombie, "FZombiemovetotarget", %zombie);
|
||||
}
|
||||
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
datablock ShapeBaseImageData(ZExplosivePack) {
|
||||
shapeFile = "pack_upgrade_satchel.dts";
|
||||
emap = false;
|
||||
};
|
||||
|
||||
function VRavZombiemovetotarget(%zombie){
|
||||
if(!isobject(%Zombie))
|
||||
return;
|
||||
if(%Zombie.getState() $= "dead")
|
||||
return;
|
||||
%pos = %zombie.getworldboxcenter();
|
||||
%closestClient = ZombieLookForTarget(%zombie);
|
||||
%closestDistance = getWord(%closestClient,1);
|
||||
%closestClient = getWord(%closestClient,0).Player;
|
||||
if(%closestDistance <= $zombie::detectDist){
|
||||
if(%zombie.hastarget != 1){
|
||||
%zombie.hastarget = 1;
|
||||
}
|
||||
%zombie.setActionThread("scoutRoot",true);
|
||||
%upvec = "250";
|
||||
if(Game.CheckModifier("Kamakazi") == 1) {
|
||||
%fmultiplier = $Zombie::FForwardSpeed * 0.5 * 5;
|
||||
}
|
||||
else {
|
||||
%fmultiplier = $Zombie::FForwardSpeed * 0.5;
|
||||
}
|
||||
|
||||
//ka-booma :)
|
||||
if(%closestDistance < 9) {
|
||||
if(%zombie.isAlive()) {
|
||||
if(Game.CheckModifier("TheDestiny") == 1) {
|
||||
ServerPlay3D("SatchelChargeExplosionSound", %zombie.getPosition());
|
||||
%c4 = new Item() {
|
||||
datablock = SatchelChargeThrown;
|
||||
position = %zombie.getPosition();
|
||||
scale = ".1 .1 .1";
|
||||
};
|
||||
MissionCleanup.add(%c4);
|
||||
schedule(770, 0, "C4GoBoom", %c4);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
ServerPlay3D("SatchelChargeExplosionSound", %zombie.getPosition());
|
||||
%c4 = new Item() {
|
||||
datablock = C4Deployed;
|
||||
position = %zombie.getPosition();
|
||||
scale = ".1 .1 .1";
|
||||
};
|
||||
MissionCleanup.add(%c4);
|
||||
schedule(770, 0, "C4GoBoom", %c4);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//moanStuff
|
||||
%chance = (getrandom() * 50);
|
||||
if(%chance >= 49) {
|
||||
%chance = (getRandom() * 12);
|
||||
if(%chance <= 11)
|
||||
serverPlay3d("ZombieMoan",%zombie.getWorldBoxCenter());
|
||||
else
|
||||
serverPlay3d("ZombieHOWL",%zombie.getWorldBoxCenter());
|
||||
}
|
||||
|
||||
%vector = ZgetFacingDirection(%zombie,%closestClient,%pos);
|
||||
|
||||
//Move Stuff
|
||||
if(%closestDistance <= $zombie::lungDist && %zombie.canjump == 1 && getword(%vector, 2) <= "0.8" ){
|
||||
%zombie.setvelocity("0 0 0");
|
||||
%fmultiplier = (%fmultiplier * 2);
|
||||
%upvec = (%upvec * 3.5);
|
||||
%zombie.canjump = 0;
|
||||
schedule(2000, %zombie, "Zsetjump", %zombie);
|
||||
}
|
||||
%vector = vectorscale(%vector, %Fmultiplier);
|
||||
%x = Getword(%vector,0);
|
||||
%y = Getword(%vector,1);
|
||||
%z = Getword(%vector,2);
|
||||
if(%z >= "1200" && %zombie.canjump == 1){
|
||||
%zombie.setvelocity("0 0 0");
|
||||
%upvec = (%upvec * 8);
|
||||
%x = (%x * 0.5);
|
||||
%y = (%y * 0.5);
|
||||
%zombie.canjump = 0;
|
||||
schedule(2500, %zombie, "Zsetjump", %zombie);
|
||||
}
|
||||
|
||||
%vector = %x@" "@%y@" "@%upvec;
|
||||
%zombie.applyImpulse(%pos, %vector);
|
||||
}
|
||||
else if(%zombie.hastarget == 1){
|
||||
%zombie.hastarget = 0;
|
||||
%zombie.zombieRmove = schedule(100, %zombie, "ZSetRandomMove", %zombie);
|
||||
%zombie.setActionThread("ski",true);
|
||||
}
|
||||
%zombie.moveloop = schedule(500, %zombie, "VRavZombiemovetotarget", %zombie);
|
||||
}
|
||||
Loading…
Reference in a new issue