YesNoOk
avatar

Hitdefattr Detection Fail (Read 239 times)

Started by Nep Heart, May 03, 2019, 11:07:13 am
Share this topic:
Hitdefattr Detection Fail
#1  May 03, 2019, 11:07:13 am
  • ***
  • CPU Purple Heart
    • USA
    • www.dailymotion.com/2a8130871d2742d2f4da3b069
 I've designed a helper based system recently in which P1 will detect the hitdef attribute of P2 whenever they're attacking. So far, it has worked pretty well and I've even managed to get it to detect the hitdefattr of attack-base helpers, however, one small issue persists... it seems to completely fail to detect hitdefs with hitpausetime of 0, especially concerning grabs in particular. I'm really unsure how to get around this small quirk.

ink

Re: Hitdefattr Detection Fail
#2  May 03, 2019, 03:40:37 pm
  • ****
  • inktrebuchet
    • USA
    • s236.photobucket.com/albums/ff271/inktrebuchet/?
Without know how your code works, I'm guessing this helper detects the hitdefattr once contact is made?

If yes, I'm thinking that you would only have that 1 tick to detect the hitdefattr. Helpers having the 1 tick delay might be preventing this.
Re: Hitdefattr Detection Fail
#3  May 03, 2019, 09:02:16 pm
  • ***
  • CPU Purple Heart
    • USA
    • www.dailymotion.com/2a8130871d2742d2f4da3b069
 Yeah, it detects hitdefattr on hit. Funny thing is that I experimented with a var outside a helper and the same exact issue happened; it fails to detect hitdefattr from any attack with a hitpausetime of 0.

ink

Re: Hitdefattr Detection Fail
#4  May 03, 2019, 09:55:52 pm
  • ****
  • inktrebuchet
    • USA
    • s236.photobucket.com/albums/ff271/inktrebuchet/?
That is strange!

I did a quick test, which proves hitdefattr does register even with hitpausetime is 0. This one also worked in a helper.
Code:
[State -2, DEBUG]
type = DisplayToClipboard
trigger1 = enemy,movecontact
text = "%d "
params = enemy,HitDefAttr = SCA, NA, HA, SA
ignorehitpause = 1

I'm sure your code is doing more than this so there must be something within your method of detection that's causing it. Are you able to post your code?

Re: Hitdefattr Detection Fail
#5  May 03, 2019, 10:09:41 pm
  • ***
  • CPU Purple Heart
    • USA
    • www.dailymotion.com/2a8130871d2742d2f4da3b069
 After some testing, I think the problem runs deeper. It's only when P2 changes states whenever their movehits (like a throw), but only when the pausehittime is 0 in their hitdef. Anyway, this code I am using (which is modified from Manson Ree's own modification).

Spoiler, click to toggle visibilty

 Also, for the record, I've done experiments with removing "enemy,movehit" and it actually detects the hitdefattr even for hitdefs with 0 hitpausetime just fine... so, I suspect it's a p2 changestate problem occurring too quickly.