YesNoOk
avatar

NumProjID (Triggers) (Read 905 times)

Started by Ricepigeon, September 15, 2015, 09:41:00 pm
Share this topic:
NumProjID (Triggers)
New #1  September 15, 2015, 09:41:00 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
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

Related Triggers:
NumProj (Triggers)
ProjCancelTime (Triggers)
ProjContact(*,***) (Triggers)
ProjContactTime (Triggers)
ProjGuarded(*,***) (Triggers)
ProjGuardedTime (Triggers)
ProjHit(*,***) (Triggers)
ProjHitTime (Triggers)

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.
Last Edit: November 25, 2015, 04:16:14 am by Odb718