YesNoOk
avatar

NumExplod (Triggers) (Read 1029 times)

Started by Ricepigeon, October 15, 2015, 03:36:05 pm
Share this topic:
NumExplod (Triggers)
#1  October 15, 2015, 03:36:05 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
This trigger takes an ID number as an optional argument. If the ID number is omitted, NumExplod returns the number of explods owned by the player. If the ID number is included, then NumExplod returns the number of explods with that ID number that are owned by the player. The ID number must be greater than -1. An ID number of -1 or less will give the same behavior as if the ID number is omitted.

Format:

        NumExplod
        NumExplod(exprn)

Arguments:

    exprn
        Expression evaluating to an ID number (int).

Return type:
    int
Error conditions:
    Returns bottom if exprn evaluates to bottom.

Examples:
Code:
1. trigger1 = NumExplod >= 4
  Triggers if the player currently owns 4 or more explods.
2. trigger1 = NumExplod(1234) >= 4
  Triggers if the player currently owns 4 or more explods with ID
  1234.

Additional Notes
Although not immediately obvious from the docs, Explods can be owned by either Players or Helpers, and as such, calling the NumExplod trigger will only return the number of Explods currently owned by the player or helper that owns them. To circumvent this issue, use the Root, Parent, and/or Helper redirection triggers when necessary.