Here is what I noticed:
Pro:
After picking up the invisibility powerup and before firing a weapon afterwards, the enemies are not alerted.
Con:
If a weapon (minus the fists) is fired, the enemies will be alerted, but for only about three seconds. There is a 'freezing' bug that needs to be fixed.
What I want is for the enemies to be alerted for the amount of time the powerup lasts and walk around aimlessly (even if they had already seen the player). After that, the enemies should then continue or begin attacking the player.
And here is the code:
Code: Select all
Spawn:
TNT1 A 0 A_JumpIfInventory ("PowerInvisibility", 1, "SpawnInvis")
PLAY A 1
TNT1 A 0 A_UnhideThing
Goto Spawn
SpawnInvis:
TNT1 A 0 A_HideThing
PLAY A 1
Goto Spawn
See:
TNT1 A 0 A_JumpIfInventory ("PowerInvisibility", 1, "SeeInvis")
TNT1 A 0 A_UnhideThing
PLAY A 6
PLAY B 6
Goto Spawn
TNT1 A 0
PLAY C 6
PLAY D 6
Goto Spawn
SeeInvis:
TNT1 A 0 A_HideThing
PLAY A 6
PLAY B 6
Goto Spawn
TNT1 A 0
PLAY C 6
PLAY D 6
Goto Spawn
Missile:
PLAY E 10 Bright A_UnhideThing
PLAY A 20
Goto Spawn
Melee:
PLAY F 6 A_UnhideThing
PLAY A 14
Goto Missile
Death:
TNT1 A 0 A_UnhideThing
PLAY H 10 A_PlayerSkinCheck ("AltSkinDeath")
PLAY I 10 A_PlayerScream
PLAY J 10 A_NoBlocking
PLAY KLM 10
PLAY N -1
Stop
XDeath:
TNT1 A 0 A_UnhideThing
PLAY O 5 A_PlayerSkinCheck ("AltSkinXDeath")
PLAY P 5 A_XScream
PLAY Q 5 A_NoBlocking
PLAY RSTUV 5
PLAY W -1
Stop