Here's the decorate code:
Mauler Firing states:
Code: Select all
Fire:
MAUG N 1 Bright A_GunFlash("Flash2")
MAUG O 0 Bright A_JumpIfInventory("ChronoAttack",1,"Fire2") <====== Here.
MAUG O 0 Bright A_PlayWeaponSound("weapons/maulfi")
MAUG O 0 Bright A_FireCustomMissile("NailShot1",frandom(-3,3),0,-4,0,0,frandom(-1,1))
MAUG O 1 Bright A_FireCustomMissile("NailShot1",frandom(-3,3),1,4,0,0,frandom(-1,1))
MAUG P 1 Bright
MAUG A 1 A_ReFire
MAUG B 2
MAUG C 3
MAUG A 4
MAUG B 5
MAUG C 6
Goto Ready
Fire2: //used for ChronoSphere Only
MAUG O 0 Bright A_PlayWeaponSound("weapons/maulfi")
MAUG O 0 Bright A_FireCustomMissile("NailShot1",frandom(-3,3),0,-4,0,0,frandom(-1,1))
MAUG O 0 Bright A_FireCustomMissile("NailShot1",frandom(-3,3),1,4,0,0,frandom(-1,1))
MAUG O 0 Bright A_FireCustomMissile("NailShot1",frandom(-3,3),0,-4,0,0,frandom(-1,1))
MAUG O 1 Bright A_FireCustomMissile("NailShot1",frandom(-3,3),1,4,0,0,frandom(-1,1))
MAUG P 1 Bright
MAUG A 1 A_ReFire
MAUG B 2
MAUG C 3
MAUG A 4
MAUG B 5
MAUG C 6
Code: Select all
actor ChronoSpeed : PowerupGiver //used for ChronoSphere
{
powerup.type "Speed"
powerup.duration 1050
+INVENTORY.AUTOACTIVATE
states
{
Spawn:
TNT1 A 1 Bright
loop
}
}
actor ChronoJump : PowerupGiver //used for ChronoSphere
{
powerup.type "HighJump"
powerup.duration 1050
+INVENTORY.AUTOACTIVATE
states
{
Spawn:
TNT1 A 1 Bright
loop
}
}
actor ChronoAttack : PowerupGiver //used for ChronoSphere
{
powerup.type "DoubleFiringSpeed"
powerup.duration 1050
powerup.color "Cyan" 0.15
+INVENTORY.AUTOACTIVATE
states
{
Spawn:
TNT1 A 1 Bright
loop
}
}
actor ChronoSphere : CustomInventory 5215
{
inventory.pickupmessage "Speedy!"
inventory.pickupsound "misc/p_pkup"
+COUNTITEM
+INVENTORY.ALWAYSPICKUP
states
{
Spawn:
TIME ABCD 6 Bright
loop
Pickup:
TIME A 0 Bright A_GiveInventory("ChronoSpeed",1)
TIME A 0 Bright A_GiveInventory("ChronoJump",1)
TIME A 0 Bright A_GiveInventory("ChronoAttack",1)
stop
}
}
Also, I'm getting a bug with the power-up where if you pick up a second ChronoSphere, when the duration expires, you'll be unable to gain the power up effects again, even if you pick up more ChronoSpheres. This doesn't reset until you die. Not sure why this is happening. The item is picked up, but it won't give any of the effects (no screen color, no faster run, attack speed, or high jump).