Here's my script of the grenade:
Code: Select all
Actor ALDM-Grenade : CustomInventory 31010
{
Tag "Hand Grenade"
Inventory.Icon "ARTIGREN"
Inventory.PickupMessage "Picked up a grenade."
Inventory.PickupSound "Pickups/Inventory"
Inventory.Amount 1
Inventory.Maxamount 25
Inventory.InterHubAmount 25
Inventory.UseSound "Grenade/Throw"
-COUNTITEM
+INVBAR
States
{
Spawn:
GREN A -1
Stop
Use:
TNT1 A 0 A_ThrowGrenade("ThrownGrenade",0,10,4)
Stop
}
}
Actor ThrownGrenade
{
Radius 8
Height 8
Speed 20
Mass 1250
+MISSILE
-NOGRAVITY
+HEXENBOUNCE
+EXPLODEONDEATH
+DEHEXPLOSION
+RANDOMIZE
+BOUNCEONACTORS
Decal SmallBulletChip
Obituary "%o was blown up by %k's grenade."
SeeSound "Grenade/Ping"
States
{
Spawn:
GREN B 0
GREN B 0 A_StopSound
GREN BCDEFGHIBCDEFGHIBCDEFGHIBCDEFGHI 2
Goto Death
Death:
MISL B 0 Bright A_Stop
MISL B 0 Bright A_ChangeFlag("NOGRAVITY",TRUE)
MISL B 0 Bright A_PlaySound("BigFuckingGun/Bang")
MISL B 0 Bright A_JumpIf(WaterLevel==0,6)
MISL BBBBB 0 Bright A_SpawnItemEx("ALDM-Bubble",Random(-16,16),Random(-16,16),Random(-16,16),0,0,Random(3,5),0,0,0)
MISL B 8 Bright A_Explode(128,64,XF_HURTSOURCE,1)
MISL C 6 Bright A_CustomBulletAttack(180,180,20,5,"ALDM-ShotgunPuff",512)
MISL D 4 Bright
Stop
}
}