YesNoOk
avatar

Simple, neat snippets of code (Crush counters, button parries, etc) (Read 4077 times)

Started by Yoshin222, September 13, 2016, 12:43:20 am
Share this topic:
Simple, neat snippets of code (Crush counters, button parries, etc)
#1  September 13, 2016, 12:43:20 am
  • ***
  • Getting better, still a long way to go
    • UK
A cute little thread with neat little things i made that maybe someone may find helpful. Enjoy!

SF4-Esque damage scaling
Spoiler, click to toggle visibilty

Pretty simple stuff really, every hit adds 1 point to var(10), and when it reaches a certain value, your attack is lowered. The variable resets when your opponent isn't in hitstun

Button triggered Parry (See SFV Ryus V-Skill)
Spoiler, click to toggle visibilty

Another simple thing, just a basic Reversaldef essentially. One state called the Parry Window, detecting if you're hit, and of course another state detecting when the parry is succesful. Of course you are on frame advantage if it hits (just a matter of tweaking the pausetime) and you get meter for pulling it off

Crush Counters (SFV Mechanic)
Spoiler, click to toggle visibilty

Crush counters are actually fairly easy, but i thought it'd be nice to have a reference in case anyone wanted them and was struggling

Controllable lightning Legs (DISCLAIMER: This one is hella beefy)
Spoiler, click to toggle visibilty

I remember making this for a friend, still no idea if he used it or not XD
Ok, to summarise what all of that means, there are 3 states intended for the startup, with 9 other states, 3 for each strength of button being pressed. During each state after startup, there is a 'command window' as i like to call it. Essentially, during these windows, if the corresponding button is pressed, you will move to the next kick, of which continues and loops back to the first kick (note i am using Chun Li as the reference, these can all of course be tweaked). The player returns to idle if they stop pressing buttons
Last Edit: September 14, 2016, 05:21:39 pm by Yoshin222
Re: Simple, neat snippets of code (Crush counters, button parries, etc)
#2  September 13, 2016, 12:53:32 am
  • ******
    • www.justnopoint.com/
In regard to your damage scaling code, I hadn't thought of it before but isn't a block state a hit state?
Re: Simple, neat snippets of code (Crush counters, button parries, etc)
#3  September 13, 2016, 12:58:29 am
  • ***
  • Getting better, still a long way to go
    • UK
Is it? I honestly didn't think of that
I think the code may still work regardless though. The var is only added when the move hits, and characters NEED to return to idle before blocking, so i think it should be fine
Re: Simple, neat snippets of code (Crush counters, button parries, etc)
#4  September 13, 2016, 01:09:19 am
  • ******
    • www.justnopoint.com/
I'm not at my PC so I can't look for sure but I think the HDBZ characters use this sort of system and it is needing to be replaced because if the opponent starts blocking a string 1st but somehow stops blocking mid string the dampener still registers from the 1st blocked hit. Then these hits that now land are dampened significantly from the start.
Re: Simple, neat snippets of code (Crush counters, button parries, etc)
#5  September 13, 2016, 01:10:46 am
  • ***
  • Getting better, still a long way to go
    • UK
Huh, thats weird
Re: Simple, neat snippets of code (Crush counters, button parries, etc)
#6  September 13, 2016, 01:18:14 am
  • ******
    • www.justnopoint.com/
Also you could apply this in -2 so you wouldn't have to apply it to every move using a range of attack statenos as triggers to limit which does what. When I can I'll look to confirm and if it's different I'll test it myself and see what happens and get back to you.
Last Edit: September 13, 2016, 01:21:19 am by Just No Point
Re: Simple, neat snippets of code (Crush counters, button parries, etc)
#7  September 13, 2016, 01:19:43 am
  • ***
  • Getting better, still a long way to go
    • UK
Ok thanks man
And yeah, you could use -2, but i prefer placing it in the code of the attack cause of multi hitting moves, makes em easier to manage IMO anyway


     Posted: September 14, 2016, 05:19:30 pm
Ok i think its an easy fix. Just have a few prevstatenos directing at the block states (130-132)


Re: Simple, neat snippets of code (Crush counters, button parries, etc)
#8  September 24, 2016, 04:58:45 am
  • ***
  • Getting better, still a long way to go
    • UK
It is. This is SF4 accurate scaling

Spoiler, click to toggle visibilty

And just for fun, the SFXT values as well

Spoiler, click to toggle visibilty