Armor code
Code: Select all
class FI_DefaultArmor : Actor
{
Default
{
alpha 0.9;
health 1000;
height 45;
mass 5;
painChance 256;
radius 16;
renderStyle "add";
scale 0.5;
+isMonster;
+shootable;
+noBlood;
+noGravity;
+thruActors
-countKill;
}
States
{
spawn:
TNT1 A 1 A_warp(AAPTR_MASTER);
loop;
see:
TNT1 A 1 A_warp(AAPTR_MASTER);
loop;
pain:
TNT1 A 1
{
A_pain;
A_warp(AAPTR_MASTER);
A_startSound("E/NP/AAJ/ARMORHITA",6,CHANF_DEFAULT,1.0,ATTN_NORM,0,0);
A_damageMaster(10);
}
goto see;
death:
TNT1 A 1 A_noBlocking();
TN11 A -1;
stop;
}
}
Code: Select all
spawn:
TNT1 A 0 NoDelay
{
NPC_bulletCount = 7;
NPC_grenadeCount = 20;
NPC_retreatCount = 3;
A_spawnItemEx("FI_DefaultArmor",0,0,0,0,0,0,0,SXF_SETMASTER);
[active,alert,death,pain,burning,scream,reload] = random_voicePicker();
activeSound = active;
seeSound = alert;
deathSound = death;
painSound = pain;
}
Video of it in action:
https://imgur.com/a/cK4Y1Sp