YesNoOk
avatar

Hitdefattr Detection Fail (Read 1097 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
    • https://www.pixiv.net/en/users/8108265
 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.
Re: Hitdefattr Detection Fail
#2  May 03, 2019, 03:40:37 pm
  • ****
    • USA
    • twitter.com/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
    • https://www.pixiv.net/en/users/8108265
 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.
Re: Hitdefattr Detection Fail
#4  May 03, 2019, 09:55:52 pm
  • ****
    • USA
    • twitter.com/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
    • https://www.pixiv.net/en/users/8108265
 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.