Eliminate Shrunk Enemies Attacking Bug: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
No edit summary
Fox (talk | contribs)
No edit summary
Line 16: Line 16:
     state checktroophit
     state checktroophit


More than fix that code, it will works as like the Assault Captain Teleport, as 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.
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.

Revision as of 17:13, 17 November 2006

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.