YesNoOk
avatar

NumEnemy (Triggers) (Read 4657 times)

Started by Ricepigeon, October 15, 2015, 03:31:25 pm
Share this topic:
NumEnemy (Triggers)
#1  October 15, 2015, 03:31:25 pm
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org
NumEnemy returns the number of opponents that exist. Neutral players and normal helpers are not considered opponents.

Format:
    NumEnemy
Arguments:
    none
Return type:
    int
Error conditions:
    none

Examples:
Code:
trigger1 = NumEnemy = 2
trigger1 = enemynear(1), name = "Squash"
  Triggers if there are 2 opponents, and the second-closest one is
  named Squash.

Additional Notes
It is best to use this trigger to preceed any trigger redirections that involve enemynear(0) or enemynear(1), so as to avoid debug errors being returned to the MUGEN console. For example, if you have an enemynear redirection trigger in any of your -2 or -3 states and Player1 is currently in the game over screen that plays during Arcade mode and/or Survival mode, a debug error will be logged to the console as no enemy will exist during these states.