Eliminate Shrunk Enemies Attacking Bug

From EDukeWiki
Revision as of 17:15, 17 November 2006 by Fox (talk | contribs)
Jump to navigation Jump to search

Probably you already have seen this bug. If you shoot an shrunk enemy, and it activates the hitting animation, it will become the normal enemy code, but still small and not coming back to the original size.

To fix that bug, you need to find the main ifhitweapon in the enemy code at GAME.con. It means that you will find that code many times, but probably all them will be already in the if condition from the main ifhitweapon. Sample: At Assault Trooper / actor LIZTROOP code will have the state checktroophit where there are many ifhitweapon tags, but before you can find ifhitweapon state checktroophit, so all them are already under that main tag.

  ifhitweapon
    state checktroophit

Just add a ifai AIENEMYSHRUNK break (remember to search at enemy code's top for "AI" name of the shrunk state, as Assault Trooper is called AITROOPSHRUNK but Pig Cop / actor PIGCOP is AIPIGSHRINK) before the main ifhitweapon.

  ifai AITROOPSHRUNK
    break
  ifhitweapon
    state checktroophit

More than fix that code, it will works as like the Assault Captain Teleport (only when he appers again it will fall dead / explode on jibs / whatever). With this code only when the enemy come back to the original size it will be show its weapon shoots reason, and no longer fall and die at the small size (as if it can respawn it would ressurect as the small enemy attacking bug).