This is a replacement for the Berserk Pack. When used, it morphs the player into a Berserk Marine class, that only has access to the Berserk Fist weapon, which has an alternate attack that lunges forward through the air. Every sector is tinted red, and the Berserk Marine screams constantly until the powerup wears off (using the player's ActiveSound, and A_LoopActiveSound in the See state).
The Berserk Pickup:
Code: Select all
ACTOR Berserk_ : CustomInventory replaces Berserk
{
Inventory.Pickupmessage "Berserk!"
Inventory.Pickupsound "pickup/berserk"
+COUNTITEM
+INVENTORY.AUTOACTIVATE
+INVENTORY.ALWAYSPICKUP
States
{
Spawn:
PSTR A -1
loop
Pickup:
TNT1 A 0 A_SetBlend("Red",1,50)
TNT1 A 0 ACS_Execute(800,0) //Script 800, changes fog, waits, changes fog back
TNT1 A 0 A_SelectWeapon("Fists")
TNT1 A 0 A_GiveInventory("BerserkHealth",1)
TNT1 A 0 A_GiveInventory("BerserkMorph",1)
}
}
ACTOR BerserkHealth : Health
{
+INVENTORY.AUTOACTIVATE
+INVENTORY.ALWAYSPICKUP
Inventory.Amount 100
inventory.pickupmessage ""
inventory.usesound ""
}
ACTOR BerserkMorph : PowerMorph
{
PowerMorph.PlayerClass "BerserkMarine"
PowerMorph.MorphStyle (MRF_FULLHEALTH|MRF_FAILNOTELEFRAG|MRF_FAILNOLAUGH|MRF_WHENINVULNERABLE|MRF_LOSEACTUALWEAPON|MRF_UNDOBYDEATH)
PowerMorph.MorphFlash "DummyActor"
PowerMorph.UnMorphFlash "DummyActor"
Powerup.Color "Red", 0.25
Inventory.InterHubAmount 0
inventory.pickupmessage ""
inventory.usesound ""
Powerup.Duration 3000
}
Code: Select all
ACTOR FistBerserk : Fists
{
Weapon.Kickback 500
obituary "%k tore %o to shreds."
weapon.slotnumber 1
+EXTREMEDEATH
+FORCEPAIN
+WEAPON.MELEEWEAPON
+WEAPON.CHEATNOTWEAPON
AttackSound "fistberserk/hit"
States
{
Ready:
FIST A 1 A_WeaponReady
loop
Deselect:
FIST A 0
FIST A 1 A_Lower
loop
Fire:
TNT1 A 0 A_Jump(128,"FireLeft")
FIST A 0 A_PlayWeaponSound("fistberserk/ready")
FIST BC 1
FIST D 0 A_Quake(3,8,0,32)
TNT1 A 0 A_SetBlend("Red",0.30,15)
FIST D 6 A_CustomPunch(((random(2,20))*10),1,0,"BerserkPuff")
FIST CB 1
TNT1 A 2
Goto Ready
FireLeft:
FIST A 0 A_PlayWeaponSound("fistberserk/ready")
FIST FG 1
FIST H 0 A_Quake(3,8,0,32)
TNT1 A 0 A_SetBlend("Red",0.30,15)
FIST H 6 A_CustomPunch(((random(2,20))*10),1,0,"BerserkPuff")
FIST GF 1
TNT1 A 2
Goto Ready
AltFire:
FIST A 1 A_CheckFloor ("AltFireReady")
FIST A 1
Goto Ready
AltFireReady:
FIST A 1 ThrustThingZ (0, 41, 0, 0)
FIST A 5 A_Recoil(-30)
Goto Ready
}
}
Code: Select all
ACTOR BerserkMarine : PlayerPawn
{
Game Doom
Speed 1.5
Health 300
Radius 16
Height 56
Mass 100
PainChance 0
Player.JumpZ 12
DamageFactor 0.2
Player.MugShotMaxHealth 100
player.startitem FistBerserk
player.morphweapon FistBerserk
obituary "%o tore %k to shreds."
hitobituary "%o tore %k to shreds."
ActiveSound "Berserk"
Player.ColorRange 112, 127
Player.DisplayName "Marine"
Player.CrouchSprite "PLYC"
Player.RunHealth 20
-PICKUP
States
{
Spawn:
PLAY A 1
PLAY A 1 A_SetBlend("Red",0.30,15)
PLAY A 0 A_Recoil(-3)
PLAY A 15 A_Quake(2,16,0,32,"world/thunder")
Loop
See:
PLAY A 0
PLAY A 0 A_AlertMonsters
PLAY A 0 A_Quake(1,16,0,32,"world/thunder")
PLAY A 0 A_LoopActiveSound
PLAY ABCD 4
goto spawn
Missile:
PLAY E 6
Goto Spawn
Melee:
PLAY F 6 BRIGHT
Goto Missile
Pain:
PLAY G 1
Goto Spawn
Death:
PLAY H 10 //A_PlayerSkinCheck(AltSkinDeath)
PLAY I 10 A_PlayerScream
PLAY J 10 A_NoBlocking
PLAY KLM 10
PLAY N -1
Stop
XDeath:
PLAY O 5 //A_PlayerSkinCheck(AltSkinXDeath)
PLAY P 5 A_XScream
PLAY Q 5 A_NoBlocking
PLAY RSTUV 5
PLAY W -1
Stop
//AltSkinDeath:
PLAY H 6
PLAY I 6 A_PlayerScream
PLAY JK 6
PLAY L 6 A_NoBlocking
PLAY MNO 6
PLAY P -1
Stop
//AltSkinXDeath:
PLAY Q 5 A_PlayerScream
PLAY R 0 A_NoBlocking
PLAY R 5 A_SkullPop
PLAY STUVWX 5
PLAY Y -1
Stop
}
}