YesNoOk
avatar

ProjContact(*,***) (Triggers) (Read 768 times)

Started by Just No Point, October 20, 2015, 03:29:18 pm
Share this topic:
ProjContact(*,***) (Triggers)
New #1  October 20, 2015, 03:29:18 pm
  • ******
    • www.justnopoint.com/

  • Online
This trigger takes an optional ID number as a suffix. If the ID number is omitted, ProjContact returns true if any of the player's projectiles either successfully hit the opponent or were guarded by the opponent. When the ID number is specified, ProjContact returns true only if any of the player's projectiles with the specified ID number either successfully hit the opponent or was guarded.

Format:
1.) ProjContact[ID] = value
2.) ProjContact[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

Error conditions:
none

Details:
ProjContact will trigger once for each hit of the projectile, so a multi-hit projectile can trigger multiple times.
The first form of ProjContact shown above is only valid for one tick after contact, unlike MoveContact.
For the second form, ProjContact returns true if the projectile made contact 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 = ProjContact1234 = 1
  Triggers if a projectile with ID 1234 just made contact with the
  opponent.
2. trigger1 = ProjContact456 = 0, < 15
  Triggers if no projectile with ID 456 made contact in the last 15

Related SCTRL:
Projectile (SCTRL) 1.0 + 1.1b

Related Triggers:
NumProj (Triggers)
NumProjID (Triggers)
ProjCancelTime (Triggers)
ProjContactTime (Triggers)
ProjGuarded(*,***) (Triggers)
ProjGuardedTime (Triggers)
ProjHit(*,***) (Triggers)
ProjHitTime (Triggers)
Last Edit: November 25, 2015, 04:11:42 am by Odb718