YesNoOk
avatar

ProjGuarded(*,***) (Triggers) (Read 950 times)

Started by Just No Point, October 20, 2015, 03:31:22 pm
Share this topic:
ProjGuarded(*,***) (Triggers)
New #1  October 20, 2015, 03:31:22 pm
  • ******
    • www.justnopoint.com/
This trigger takes an optional ID number as a suffix. If the ID number is omitted, ProjGuarded returns true if any of the player's projectiles were guarded by the opponent. When the ID number is specified, ProjGuarded returns true only if one of the player's projectiles with the specified ID number was guarded by the opponent.

Format:
1.) ProjGuarded[ID] = value
2.) ProjGuarded[ID] = value, [oper] value2

Arguments:
[ID]
Optional ID number.
value (boolean)
Value to compare against. 0 for false, 1 for true.
[oper]
=, !=, <, >, <=, >=
value2
Time value to compare against.

Return type:
boolean int (1 or 0)

Error conditions:
none

Details:
ProjGuarded will trigger once for each hit of the projectile, so a multi-hit projectile can trigger multiple times.

The first form of ProjGuarded shown above is only valid for one tick after hit, unlike MoveGuarded.

For the second form, ProjGuarded returns true if the projectile was guarded n ticks ago, where n is a nonnegative number satisfying the relation "n [oper] value2".

Specifying an ID number of 0 gives the same behavior as if the ID number is omitted (check all projectiles).

Examples:
Code:
1. trigger1 = ProjGuarded1234 = 1
  Triggers if the opponent just blocked a projectile with ID 1234.
2. trigger1 = ProjGuarded = 1, < 15
  Triggers if the opponent blocked any projectile in the last 15
  ticks.

Related SCTRL:
Projectile (SCTRL) 1.0 + 1.1b

Related Triggers:
NumProj (Triggers)
NumProjID (Triggers)
ProjCancelTime (Triggers)
ProjContact(*,***) (Triggers)
ProjContactTime (Triggers)
ProjGuardedTime (Triggers)
ProjHit(*,***) (Triggers)
ProjHitTime (Triggers)
Last Edit: November 25, 2015, 04:08:31 am by Odb718