YesNoOk
avatar

Pushblock Help (Read 5120 times)

Started by Ki$@1st456v, May 07, 2022, 12:27:59 pm
Share this topic:
Pushblock Help
#1  May 07, 2022, 12:27:59 pm
  • avatar
  • **
    • USA
Hi, everyone! I have been trying to get the pushblock on Megaman X to shove the opponent away. However, I cannot get the way to find the value in the coding to change the distance the advancing guard pushes you. Here is my code below.

;Guard Push (Stand)
[Statedef 60000060]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 60000060
sprpriority = 2

[State 6300, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6300, a2]
type = VelSet
trigger1 = Time = 1
x = 0

[State 6300, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6300, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 30

[State 6300, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 60000061
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6300, a6]
type = Explod
trigger1 = Time = 0
anim = 20300
postype = p1
pos = 53,-50
;ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7
;scale = .5,.5

[State 6300, a7]
type = PlaySnd
trigger1 = AnimElem = 1
value = s8500,0
volume = 255
;channel = 1

[State 6300, a8]
type = PlaySnd
trigger1 = AnimElem = 1
value = s6300,0
;channel = 0

[State 6300, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Guard Push (Crouch)
[Statedef 60000062]
type    = C
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 60000062
sprpriority = 2

[State 6310, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6310, a2]
type = VelSet
trigger1 = Time = 1
x = 0

[State 6310, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6310, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 30

[State 6310, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 60000061
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6310, a6]
type = Explod
trigger1 = Time = 0
anim = 20300
postype = p1
pos = 33,-45
;ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7
;scale = .5,.5

[State 6310, a7]
type = PlaySnd
trigger1 = AnimElem = 1
value = s8500,0
volume = 255
;channel = 1

[State 6310, a8]
type = PlaySnd
trigger1 = AnimElem = 1
value = s6300,0
;channel = 0

[State 6310, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Guard Push (air)
[Statedef 60000063]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 60000063
sprpriority = 2

[State 6320, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6320, a2]
type = VelSet
trigger1 = Time = 1
x = 0

[State 6320, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6320, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 30

[State 6320, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 60000061
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6320, a6]
type = Explod
trigger1 = Time = 0
anim = 20300
postype = p1
pos = 33,-55
;ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7
;scale = .5,.5

[State 6320, a7]
type = PlaySnd
trigger1 = AnimElem = 1
value = s8500,0
volume = 255
;channel = 1

[State 6320, a8]
type = PlaySnd
trigger1 = AnimElem = 1
value = s6300,0
;channel = 0

[State 6320, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
ctrl = 1

;---------------------------------------------------------------------------
;Guard Push (Helper)
[Statedef 60000061]
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = 60000061
sprpriority = -4

[State 6350, a1]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 6350, a2]
type = VelSet
trigger1 = Time = 0
x = 600

[State 6350, a3]
type = VelSet
trigger1 = Time >= 0
x = 600

[State 6350, a4]
type = VelSet
trigger1 = Time >= 0
x = 600

[State 6350, a5]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 6350, a6]
type = DestroySelf
trigger1 = Time >= 18


;---------------------------------------------------------------------------------------------

What am I missing in my code to get the advancing guard to push the opponent back? I tried to change the Velset at the helper section to large numbers to see if I would see any difference in distance, but it still did nothing. If anyone has the answer and would help I would greatly appreciate it. Thank you and have a great day!
Re: Pushblock Help
#2  May 07, 2022, 02:20:36 pm
  • ***
  • 하나뿐인 한국인 대표
  • Ambassador of MugenRevival
    • South Korea
    • sites.google.com/view/kolossoni-mugen
So let me get this straight, is the guard a helper? also, are you trying to create a wall that pushes the opponent to a specific direction?
If that's the case, you need the wall (helper) to stick to the player at all times even when moving, otherwise the helper will just go right through.
Re: Pushblock Help
#3  May 07, 2022, 04:42:58 pm
  • avatar
  • **
    • USA
I see in the code that it has the animation for the guard helper in the different states for standing, crouching, and jumping, so I am guessing it is a helper. Yes, in response to the question about the wall pushing the opponent, I am trying to have the pushblock similar to the mvc2 version where it pushes the opponent back after pressing x+y during guarding to break rushdown and pressure. I am not sure what to do to make it move with the player at all times though.
Re: Pushblock Help
#4  May 07, 2022, 05:35:31 pm
  • ***
  • 하나뿐인 한국인 대표
  • Ambassador of MugenRevival
    • South Korea
    • sites.google.com/view/kolossoni-mugen
Ah, okay. I had to watch a youtube video to figure out what "pushblock" exactly is in MVC2. I kinda got the jist of it now.
You would definitely need some kind of a helper in order for this to work. Thankfully I had to recreate something very similar for one of my own projects very recently, so I'm pretty experienced with this feature.

First things first, your velocity is way too fast. 600 will make the helper pass through the player even if the CLSN is big.
And I think I said this before, but you have redundant sctrls that don't do anything again.
Code:
[State 6350, a2]
type = VelSet
trigger1 = Time = 0
x = 600

[State 6350, a3]
type = VelSet
trigger1 = Time >= 0
x = 600

[State 6350, a4]
type = VelSet
trigger1 = Time >= 0
x = 600
All of these are doing the same thing, just keep one. You really need to fix this habit.
Keep one and change the x value from 600 to smth around 20.
Code:
[State 6350]
type = VelSet
trigger1 = 1
x = 20
That should be enough.

Next, try adding this code:
Code:
[State 6350, PosSet]
type = PosSet
trigger1 = !time
x = floor(enemynear(0), pos X)+ifelse(facing=1,-50,50)
ignorehitpause = 1
persistent = 1
This will ensure that the helper (aka the Wall) will stay at least 50 pixels in front of the opponent and prevent it from passing through at all times.

Try this method and get back to me.
Re: Pushblock Help
#5  May 08, 2022, 04:36:40 am
  • avatar
  • ***
    • https://sites.google.com/site/mgmurrow/
you can look in any of my characters for the code under "Guard Push", also your helper must have a blank animation with CLNS2 to
push the P2 back.
Also this doesnt work if P2 has his back against the wall.  For that situation you will have to set a velset for P1.

let me know if you need more help

MGMURROW
Re: Pushblock Help
#6  May 08, 2022, 07:55:15 am
  • avatar
  • **
    • USA
Thank you both! Kolossoni's code for the PoSSet works. I am just wondering though, how can I increase the distance of the guardpush?
Re: Pushblock Help
#7  May 08, 2022, 12:08:45 pm
  • ***
  • 하나뿐인 한국인 대표
  • Ambassador of MugenRevival
    • South Korea
    • sites.google.com/view/kolossoni-mugen
I'm glad to hear the code worked as intended however, I'm not really grasping the idea of "increasing the distance" of guardpush.
Do you mean to push the opponent farther? or to make the hitbox bigger? I need you to be more specific for a better solution.
Re: Pushblock Help
#8  May 08, 2022, 10:48:13 pm
  • avatar
  • **
    • USA
I meant for the guardpush to push the opponent further. I am not sure what increasing the collision box would do.
Re: Pushblock Help
#9  May 09, 2022, 03:13:28 pm
  • ***
  • 하나뿐인 한국인 대표
  • Ambassador of MugenRevival
    • South Korea
    • sites.google.com/view/kolossoni-mugen
If you have a hitdef assigned to an attack, try changing the push back value.
If the helper is the problem, I think it may be due to it destroying itself too early. Maybe try increasing the time it takes before it destroys itself.
Re: Pushblock Help
#10  May 11, 2022, 05:30:04 pm
  • avatar
  • **
    • USA
Thank you Kolossoni! Also I was not sure, but what can I put in the coding to increase the velocity that the helper pushes back the opponent when I do the advancing guard?
Re: Pushblock Help
#11  May 12, 2022, 09:39:31 am
  • ***
  • 하나뿐인 한국인 대표
  • Ambassador of MugenRevival
    • South Korea
    • sites.google.com/view/kolossoni-mugen
Sorry, I'm not familiar with the term, "advancing guard". Can you elaborate a little bit?
Re: Pushblock Help
#12  May 12, 2022, 11:43:45 am
  • avatar
  • ***
    • https://sites.google.com/site/mgmurrow/
In you helper state it has a velset, just increase the x value.

Check any of my characters, they have everything you need or post the helper state code so we can show you exactly what you need to modify

Hope this helps

MGMURROW
Re: Pushblock Help
#13  May 12, 2022, 05:08:32 pm
  • avatar
  • **
    • USA
Advancing Guard refers to the pushblock in Marvel VS Capcom 3. It is the same thing as a pushblock. I was just using the terms interchangeably. I have my code for the helper state the pushblock here, and I have been trying to alter the velset to change the velocity but I get nothing.

;Guard Push (Helper)
[Statedef 60000064]
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = 60000061
sprpriority = -4

[State 6350, a1]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 6350, a2]
type = VelSet
trigger1 = Time = 0
x = 30

[State 6350, a3]
type = VelSet
trigger1 = Time = 0
x = 20

[State 6350, a4]
type = VelSet
trigger1 = Time >= 0
x = 10

[State 6350, PosSet]
type = PosSet
trigger1 = !time
x = floor(enemynear(0), pos X)+ifelse(facing=1,-180,180)
ignorehitpause = 1
persistent = 1

[State 6350, a5]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 6350, a6]
type = DestroySelf
trigger1 = Time = 70

I am not sure which I change to make the velocity of the pushback of the pushblock faster.
Re: Pushblock Help
#14  May 12, 2022, 09:31:40 pm
  • ***
  • 하나뿐인 한국인 대표
  • Ambassador of MugenRevival
    • South Korea
    • sites.google.com/view/kolossoni-mugen
That's because you have redundant codes that do the same thing.
You have three velset triggers.

Use only one.
Re: Pushblock Help
#15  May 13, 2022, 12:53:54 pm
  • avatar
  • ***
    • https://sites.google.com/site/mgmurrow/

;Guard Push (Helper)
[Statedef 60000064]
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = 60000061
sprpriority = -4

[State 6350, a1]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 6350, a2]
type = VelSet
trigger1 = Time = 0
x = 30

[State 6350, PosSet]
type = PosSet
trigger1 = !time
x = floor(enemynear(0), pos X)+ifelse(facing=1,-180,180)
ignorehitpause = 1
persistent = 1

[State 6350, a5]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 6350, a6]
type = DestroySelf
trigger1 = Time = 70 <———-this might need to be lowered, my code is like 5

I am not sure which I change to make the velocity of the pushback of the pushblock faster.

But like I said if p2 is close to the edge of the screen then this will not work, you will have to use a velset for p1 to get the effect, look at any of my characters for the code and modify it as you need

MGMURROW
Re: Pushblock Help
#16  May 15, 2022, 10:35:50 am
  • avatar
  • **
    • USA
Thanks again Kolossoni! The multiple velsets in the coding of the Guard Helper came that way from REDHOT's Cyclops that I was using, but I had to get rid of both the first and the third velsets because the second velset was the one affecting velocity. Thank you both again. This topic is solved.