The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => MUGEN Class => Topic started by: Ricepigeon on September 15, 2015, 09:41:00 pm

Title: NumProjID (Triggers)
Post by: Ricepigeon on September 15, 2015, 09:41:00 pm
This trigger takes an ID number as a required argument. It returns the number of projectiles currently owned by the player and having the specified ID number.

Format:
    NumProjID(exprn)
Arguments:
    exprn
        Expression evaluating to an ID number.

Return type:
    int
Error conditions:
    If a negative ID is specified, then the ID defaults to 0. Returns bottom if exprn evaluates to bottom.

Examples:
Code:
trigger1 = NumProjID(1234) = 1
  Triggers if there the player currently owns exactly 1 projectile with the ID number 1234.

Related SCTRL:
Projectile (SCTRL) 1.0 + 1.1b (http://mugenguild.com/forum/topics/projectile-sctrl-169755.0.html)

Related Triggers:
NumProj (Triggers) (http://mugenguild.com/forum/topics/numproj-triggers-169143.0.html)
ProjCancelTime (Triggers) (http://mugenguild.com/forum/topics/projcanceltime-triggers-169922.0.html)
ProjContact(*,***) (Triggers) (http://mugenguild.com/forum/topics/projcontact-triggers-169923.0.html)
ProjContactTime (Triggers) (http://mugenguild.com/forum/topics/projcontacttime-triggers-169924.0.html)
ProjGuarded(*,***) (Triggers) (http://mugenguild.com/forum/topics/projguarded-triggers-169925.0.html)
ProjGuardedTime (Triggers) (http://mugenguild.com/forum/topics/projguardedtime-triggers-169926.0.html)
ProjHit(*,***) (Triggers) (http://mugenguild.com/forum/topics/projhit-triggers-169927.0.html)
ProjHitTime (Triggers) (http://mugenguild.com/forum/topics/projhittime-triggers-169928.0.html)

Additional Notes:
Keep in mind that the NumProjID trigger only detects projectiles that have been created through the use of the Projectile SCTRL. Helper-based projectiles will not be detected by this trigger.

Additionally, because all projectiles created through the use of the Projectile SCTRL immediately become owned by the root (player character) when created, attempting to use the NumProjID trigger from inside a helper state will always return a value of 0, even if the projectile was created by that same helper. Due to this, you should use the redirect "root,NumProjID" trigger instead if you intend to use the NumProjID trigger from within a helper state.