YesNoOk
avatar

ProjGuardedTime (Triggers) (Read 684 times)

Started by Just No Point, October 20, 2015, 03:32:13 pm
Share this topic:
ProjGuardedTime (Triggers)
New #1  October 20, 2015, 03:32:13 pm
  • ******
    • www.justnopoint.com/
This trigger takes an required nonnegative ID number as an argument. If the player's last projectile to make any kind of contact was guarded by the opponent and had the specified ID number, then ProjGuardedTime returns the number of ticks since that contact occurred. If the specified ID number is 0, then the projectile ID is not checked. If no projectile meets all the above conditions, then ProjGuardedTime returns -1.

Format:
ProjCancelTime(exprn)

Arguments:
exprn
Expression evaluating to a nonnegative ID number (int).

Return type:
int

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

Examples:
Code:
1. trigger1 = ProjGuardedTime(1234) = 1
  Triggers if a projectile with ID 1234 was just guarded by the
  opponent.
2. trigger1 = ProjGuardedTime(0) != -1 && ProjGuardedTime(0) < 15
  Triggers if any of the player's projectiles was guarded by the
  opponent within the last 15 ticks.
 
Related SCTRL:
Projectile (SCTRL) 1.0 + 1.1b

Related Triggers:
NumProj (Triggers)
NumProjID (Triggers)
ProjCancelTime (Triggers)
ProjContact(*,***) (Triggers)
ProjContactTime (Triggers)
ProjGuarded(*,***) (Triggers)
ProjHit(*,***) (Triggers)
ProjHitTime (Triggers)
Last Edit: November 25, 2015, 04:07:16 am by Odb718