This trigger takes an required nonnegative ID number as an argument. If the player's last projectile to make any kind of contact successfully hit the opponent and had the specified ID number, then ProjHit 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 ProjHitTime returns -1.
Expression evaluating to a nonnegative ID number (int).
Returns bottom if exprn evaluates to bottom. If a negative ID is specified, then the ID defaults to zero.
1. trigger1 = ProjHitTime(1234) = 1
Triggers if a projectile with ID 1234 just made successful
contact with the opponent.
2. trigger1 = ProjHitTime(0) != -1 && ProjHitTime(0) < 15
Triggers if any of the player's projectiles made successful
contact with the opponent within the last 15 ticks.
Projectile (SCTRL) 1.0 + 1.1b (http://mugenguild.com/forum/topics/projectile-sctrl-169755.0.html)
NumProj (Triggers) (http://mugenguild.com/forum/topics/numproj-triggers-169143.0.html)
NumProjID (Triggers) (http://mugenguild.com/forum/topics/numprojid-triggers-169144.0.html)
ProjCancelTime (Triggers) (http://mugenguild.com/forum/topics/projcanceltime-triggers-169922.0.html)
ProjContact(*,***) (Triggers) (http://mugenguild.com/forum/topics/projcontact-triggers-169923.0.html)
ProjContactTime (Triggers) (http://mugenguild.com/forum/topics/projcontacttime-triggers-169924.0.html)
ProjGuarded(*,***) (Triggers) (http://mugenguild.com/forum/topics/projguarded-triggers-169925.0.html)
ProjGuardedTime (Triggers) (http://mugenguild.com/forum/topics/projguardedtime-triggers-169926.0.html)
ProjHit(*,***) (Triggers) (http://mugenguild.com/forum/topics/projhit-triggers-169927.0.html)
Okay so during a test I notice some rather questionable behavior:
We were using this controller to play a sound on Projectile with ID 1000 hit in statedef -2:
type = PlaySnd
trigger1 = ProjHitTime(1000) = 0
value = 1,2
channel = 2
ignorehitpause = 1
We thought this code was solid enough to use since ProjHitTime(1000) works as a timer, yeah right... turns out we were duped, this scenario happenned:
I devised the following DisplayToClipboard, NOTE THE IGNOREHITPAUSE = 1:
[State -2, Debug]
type = displaytoclipboard
trigger1 = 1
text = "ProjHitTime(1000) = %d / ProjGuardedTime(1000) = %d"
params = ProjHitTime(1000), ProjGuardedTime(1000)
ignorehitpause = 1
First, we hit P1 with the projectile with ID 1000, this causes it to become non -1, AKA, it begins counting upwards as normal, then I hit P2 at the EXACT MOMENT ProjHitTime(1000) = 0 and I notice something... The sound suddenly spams itself MULTIPLE TIMES.
As it turns out by the debug ProjHitTime(1000) was frozen IN THE SAME TIME DURING P1'S PAUSETIME, at first I thought, I probably butched the ignorehitpause = 1, not really, it was there all along. So it seems ProjHitTime(exprn) does NOT increment during P1's hitpause, so be wary of this.