Hey everyone,I have scanned through the FAQs, but haven't found this anywhere, so please forgive me if I have missed itIn looking through code examples, I keep coming across certain punctuation marks (!,%, and the like) before a command such as MoveHit or MoveContact, and I have no idea what they do to the command. I thought they maybe act as an "=1" kind of thing, but I have no idea, and I can't seem to find anything that explains it.Second, and this is a more specific request, is there a trigger I could put in a HitDef that causes p2 to get hit as soon as they come in contact with the attack, but then only at certain intervals (say every 5 ticks, or every 5 frames) after the initial hit? For example, I want p2 to change to a custom state that freezes them in place as soon as they come in contact with the attack, but they continue to get hit say every 5 ticks or animelems afterward until he attack ends. I've played around with a few different things, but can't seem to get it to work, and all my searches have come up empty. Not looking for anyone to write any codes out for me, just a possible nudge to lead me in the right direction.While I'm at it (so I don't keep bugging you guys unnecessarily), I have an attack that loops after so many frames so I can cut down on Anim frames. But the attack doesn't hit the opponent on the frames that are being looped, despite there being collision boxes. In this case, should I be using 'time=" triggers in the HitDef instead of "AnimElem="? Perhaps I should forget loops for this purpose. Any suggestions would be appreciated.Thanks!
I'd have to think about the second, but the first and third I can answer immediately! before a trigger always means that the trigger is to be activated if it's not true, that is, returns 0. It's used like a boolean, but instead of working as either 1 or 0, it's any integer, positive or negative, or 0.!movecontact is equivalent to movecontact = 0movecontact is equivalent to movecontact = 1!var(30) is equivalent to var(30) = 0var(30) is equivalent to var(30)=1 AND var(30) = -1For the looping attack, use multiple hitdefs. Generally you can use one with trigger1 = animelem = x and trigger2 = animelem = y, but sometimes triggering one hitdef multiple times can get buggy. It also gives you more control over each hit in the sequence as opposed to having to use the same values each time.
Bannana said, March 22, 2021, 10:37:09 pmI'd have to think about the second, but the first and third I can answer immediately! before a trigger always means that the trigger is to be activated if it's not true, that is, returns 0. It's used like a boolean, but instead of working as either 1 or 0, it's any integer, positive or negative, or 0.!movecontact is equivalent to movecontact = 0movecontact is equivalent to movecontact = 1!var(30) is equivalent to var(30) = 0var(30) is equivalent to var(30)=1 AND var(30) = -1For the looping attack, use multiple hitdefs. Generally you can use one with trigger1 = animelem = x and trigger2 = animelem = y, but sometimes triggering one hitdef multiple times can get buggy. It also gives you more control over each hit in the sequence as opposed to having to use the same values each time.Thank you, you have been most helpful. In searching out some more code, I was finally able to answer my second and possibly third question (and was just coming on here to edit my initial comment so I didn't waste your time when I saw your response), but that first part about the punctuation was still a mysteryReally appreciate it!
Irc hitdef has a misstime parameter. Check the docs for that. Otherwise you can do Time > numberPersistent = 5And the attack will hit every 5 ticksOr trigger1 = time%5 = 5Which will hit every 5 ticks after tick 5. Last one i forget how loopstart behaves with hitdefs. Hitdefs are one of the weirder sctrls in that you can activate them early and they stay active till they hit.