YesNoOk
avatar

Width (SCTRL) (Read 16553 times)

Started by JustNoPoint, November 03, 2015, 05:16:26 pm
Share this topic:
Width (SCTRL)
#1  November 03, 2015, 05:16:26 pm
  • ******
    • www.justnopoint.com/
Temporarily changes the size of the player's width bar for 1 tick. Useful for controlling the "pushing" behavior when the player makes contact with another or with the sides of the screen.

Required parameters:
none

Optional parameters:
edge = edgewidth_front, edgewidth_back (int, int)
Sets the player's edge width in front and behind. Edge width determines how close the player can get to the edge of the screen. These parameters default to 0,0 if omitted.

player = playwidth_front, playwidth_back (int, int)
Sets the player width in front and behind. Player width determines how close the player can get to other players. These parameters default to 0,0 if omitted.

Alternate syntax:
value = width_front, width_back (int, int)
This is a shorthand syntax for setting both edge width and player width simultaneously. This may only be used if the edge and player parameters are not specified.

Notes:
When collision box display is enabled, the edge width bar is displayed in orange, and the player width bar is displayed in yellow. Where they overlap, the overlapping region is displayed in bright yellow.
Example:
none
Re: Width (SCTRL)
#2  November 15, 2015, 02:39:48 pm
  • *****
  • Shame on you!
    • USA
One thing that really isnt pointed out here is the relationship between the blue box and the width bar. It is a problem/concept new people dont tend to figure out.
NOTE: THESE HIT BOXES WERE MADE FOR THIS EXAMPLE. DO NOT USE SIMILAR CLSN BOXES.

I've tried to show a couple things in this pic. The first thing you'll notice is some Ryus are bright blue, and the others arent. CTRL+C changes that.
But the sets of Ryus have "normal" width(s) and clsn boxes. You can see the line under his feet. The first set they arent touching at all, and the second set you can see the blue clsn boxes are overlapped and the width lines arent.

When the blue boxes touch AND the width lines touch, Mugen says the characters cant go further.

But here's the tricky part. See the two Ryus that have the edited widths? The first Ryu's Ground.Back is juuuust slightly outside of his clsn box. The rightmost Ryu's width is offset and is outside of his clsn boxes too. They'll both cause problems.
Width lines can overlap. Mugen allows this to happen. But the moment the clsn boxes of P1 & P2 touch, Mugen SNAPS the two players so that the width bars arent overlapping. It POPS! the character back. Most of the time you'll notice this happen when either player is walking forward and bumps into the enemy. They'll keep popping back a bit and walking forward and popping back.

One pixel more and the two Ryus jump to the second set's position because P1's in the corner.
When the width bar is inside the clsn box, Mugen is actively looking to set the 2 players apart. So when the width bars finally do make contact Mugen stops it smoothly. There's no pop. 
vVv Ryuko718 Updated 10/31/22 vVv
Last Edit: November 17, 2015, 12:56:51 am by Odb718
Re: Width (SCTRL)
#3  November 17, 2015, 04:42:36 am
  • ******
    • www.justnopoint.com/
The above CLSN are also "incorrect". To see a discussion on that and why go to this thread.
Re: Width (SCTRL)
#4  June 27, 2017, 02:06:11 pm
  • **
  • I got tired of waiting for someone to do it for me
    • Argentina
In which cases would it be useful to use this SCTRL?
Re: Width (SCTRL)
#5  June 27, 2017, 03:38:25 pm
  • ******
    • www.justnopoint.com/
The most common is with certain attacks that make the char step forward visually but not actually step forward. They return to their axis they started in. With attacks like these you can easily step outside your width bar. So at close range the attack passes through P2, misses, then steps back in front of P2. With width it could push P2 as needed.

Or some chars hunch over and look wider. Sometimes they have attack where they stand straight and get slimmer. You would walk and push them without touching them.
Re: Width (SCTRL)
#6  June 27, 2017, 04:51:04 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
I haven't tested it, but I believe the width controller also adjusts the size.ground.front and size.ground.back values returned by the Const trigger (?)  At least it would make sense.  In which case, an accurate width would be useful for other characters relying on the values from that trigger.