YesNoOk
avatar

Maverick Hunter Zero Help: Z Buster function (Read 9251 times)

Started by RedDragonCats17, April 03, 2019, 07:56:59 am
Share this topic:
Maverick Hunter Zero Help: Z Buster function
#1  April 03, 2019, 07:56:59 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Not MegaMan Zero this time. It's the MMX Zero. I'm trying to make his Z Buster function like this:


(at 2:29)

Zero stands still as he charges his buster. There's a bar right next to his health that goes up to 3 levels. Each level can be a fully powered charge shot, or a Hadangeki (sword beam) if you press down.

There's a twist unlike the video. Zero has a 4th level, which is Genmu Zero. Once Zero reaches the 4th level, he won't fire Genmu Zero immediately. He'll only fire it the next time you press the button.

Here's the code for the Charge state:

Spoiler, click to toggle visibilty

Now I'm using a variable as the bar for the 4 levels, and I want to use it to make it function how I want it to function. Apparently Zero has a habit of entering state 231. Even though the variable reaches to the 4th level (250) and I release the button, Zero enters state 231. When the variable reaches to the 3rd level and I release the button, Zero enters state 232, but then enters state 231 immediately after. I've tried everything that I could think of to fix this, but nothing's working. At first I wanted to give up, but I forgot that I can make as many help threads as I want as long as it's not something that's already solved, so I've decided to try the forums.

https://streamable.com/2ihe4

So, how do I fix this? How do I stop Zero from entering state 231 when he doesn't have to, according to the changestate for 231?
Last Edit: April 24, 2019, 03:58:09 am by RedDragonCats17
Re: Maverick Hunter Zero Help: Z Buster function
#2  April 03, 2019, 08:23:24 am
  • ****
  • Objection! Sustained!
    • Russia
    • mitia.pogorelov1@yandex.ru
-About the problem with the habit of entering the wrong State:
You made him enter the State 231 when the variable is BIGGER or EQUAL to 10, meaning, that it goes from 10 to Infinity. You need to create limitations. Here, I tried to fix it:
Code:
;---------------------------------------------------------------------------
; Charge
[Statedef 230]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 230                       ;Change animation (Def: no change)
poweradd = 0                    ;Power to add (Def: 0)
sprpriority = 2
 
[State 0, VarSet]
type = VarSet
trigger1 = var(3) >= 250
var(3) = 250
 
[State 0, VarAdd]
type = VarAdd
trigger1 = command = "hold_y"
var(3) = 1
 
[State 0, ChangeState]
type = ChangeState
triggerall = var(3) = 250
trigger1 = animtime = 0
value = 0
ctrl = 1
 
[State 0, ChangeState]
type = ChangeState
triggerall = var(3) >= 150 && var(3) < 250
triggerall = var(3) >= 100 && var(3) < 150
triggerall = var(3) >= 50 && var(3) < 100
trigger1 = command != "hold_y"
trigger1 = command != "holddown"
value = 232
 
[State 0, ChangeState]
type = ChangeState
triggerall = var(3) >= 150 && var(3) < 250
triggerall = var(3) >= 100 && var(3) < 150
triggerall = var(3) >= 50 && var(3) < 100
trigger1 = command != "hold_y"
trigger1 = command = "holddown"
value = 233
 
[State 0, ChangeState]
type = ChangeState
trigger1 = var(3) >= 10 && var(3) < 50
trigger1 = command != "hold_y"
value = 231
 
[State 0, PalFX]
type = PalFX
trigger1 = var(3) = 250
time = 40
add = 256,256,256
sinadd = 256,256,256,50
invertall = 0
color = 256
Last Edit: April 03, 2019, 08:29:34 am by Trololo
Re: Maverick Hunter Zero Help: Z Buster function
#3  April 03, 2019, 08:52:49 am
  • *****
  • Shame on you!
    • USA
Code:
[State 0, VarSet]
type = VarSet
trigger1 = time = 0
trigger2 = var(3) < 10
trigger2 = command != "hold_y"
var(3) = 0

[State 0, VarSet]
type = VarSet
trigger1 = var(3) > 250
var(3) = 250
 
[State 0, VarAdd]
type = VarAdd
triggerall = var(3) < 250
trigger1 = command = "hold_y"
var(3) = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = var(3) = 250
trigger1 = animtime = 0
trigger2 = var(3) < 10
trigger2 = command != "hold_y"
value = 0
ctrl = 1
vVv Ryuko718 Updated 10/31/22 vVv
Re: Maverick Hunter Zero Help: Z Buster function
#4  April 12, 2019, 09:29:35 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Odb, Trololo, I got internet on my computer, but I'm using my phone's personal hotspot as the connection.

So, I tried both of your codes, as you can see:

Spoiler, click to toggle visibilty

And this happened (I hope you can see the debug alright).

https://streamable.com/v7sp6

But get this. When I was recording the issue on my phone, Zero did Genmu Zero out of the blue, and then did the full powered shot and etc. So I don't know what happened there.

But, if you're wondering if there's a change state that makes Zero go to state 231 in the full powered shot, there isn't.

Here's the full powered shot after you release the button:

Spoiler, click to toggle visibilty

There is a changestate, but it's for state 0, not state 231.
Re: Maverick Hunter Zero Help: Z Buster function
#5  April 12, 2019, 09:44:33 pm
  • *****
  • Shame on you!
    • USA
Stop using projectiles. Make helpers.
and wth is all this?
triggerall = var(3) >= 150 && var(3) < 250
triggerall = var(3) >= 100 && var(3) < 150
triggerall = var(3) >= 50 && var(3) < 100

so if it's = 50, and up to 99, and = 100 and up to 149, and = 150, and up to 249.
So >=50 && <= 249.
What happened to the changestate for 250??
vVv Ryuko718 Updated 10/31/22 vVv
Re: Maverick Hunter Zero Help: Z Buster function
#6  April 13, 2019, 01:30:48 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Stop using projectiles. Make helpers.
and wth is all this?
triggerall = var(3) >= 150 && var(3) < 250
triggerall = var(3) >= 100 && var(3) < 150
triggerall = var(3) >= 50 && var(3) < 100

so if it's = 50, and up to 99, and = 100 and up to 149, and = 150, and up to 249.
So >=50 && <= 249.
What happened to the changestate for 250??

It makes no difference on whether I make a helper or use a projectile, they both do the same thing regardless. And besides, I'm not planning on doing anything fancy with the full powered shot, and I don't want it to be deflectable by MegaMan Zero's Shield Boomerang, so using projectiles for that is just easier for me.

That code came from Trololo. He gave me the code to try it out, and it gave me what I showed you in the video.

Nothing changed in state 250. As soon as var(3) got to 250, I expected Zero to do the full powered shot, and then do the half shot as a means to show you, but out of the blue he did Genmu Zero, and then did the other 2 shots. I actually have evidence on my phone, let me get it for you.

https://streamable.com/zlsev
Last Edit: April 13, 2019, 01:58:28 am by RedDragonCats17
Re: Maverick Hunter Zero Help: Z Buster function
#7  April 13, 2019, 09:50:38 pm
  • *****
  • Shame on you!
    • USA
So did you check out that move's changestate trigger in statedef -1?
vVv Ryuko718 Updated 10/31/22 vVv
Re: Maverick Hunter Zero Help: Z Buster function
#8  April 14, 2019, 03:41:47 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Yes, I've been placed it to the near bottom, and it still triggers after the full charge shot.

Here's what the command for state 231 looks like:

Code:
;---------------------------------------------------------------------------
;Half Buster Shot
[State -1, Half Buster Shot]
type = ChangeState
value = 231
triggerall = var(3) >= 10
triggerall = command != "hold_y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

And here are the commands for the full charge shots/sword beams:

Spoiler, click to toggle visibilty
Re: Maverick Hunter Zero Help: Z Buster function
#9  April 14, 2019, 09:17:17 am
  • *****
  • Shame on you!
    • USA
As soon as var(3) got to 250, I expected Zero to do the full powered shot, and then do the half shot as a means to show you, but out of the blue he did Genmu Zero, and then did the other 2 shots.
This is the move I was talking about.

Also, again, all of this
triggerall = var(3) >= 150
triggerall = var(3) >= 100
triggerall = var(3) >= 50
is equal to this
triggerall = var(3) >= 50
vVv Ryuko718 Updated 10/31/22 vVv
Re: Maverick Hunter Zero Help: Z Buster function
#10  April 14, 2019, 10:05:09 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
So how can I make Zero fire the shot at any of those levels when the button's released?
Re: Maverick Hunter Zero Help: Z Buster function
#11  April 14, 2019, 11:11:24 am
  • avatar
  • ***
    • https://sites.google.com/site/mgmurrow/
Hey reddragoncats17, there seems to be more going on somewhere else in the code, don’t know if anyone will be able to solve it without seeing the whole code. If you like, send me the character and I will take a look at it for you, it might be Monday when I will get the time

Talk to you soon

MGMURROW
Re: Maverick Hunter Zero Help: Z Buster function
#12  April 14, 2019, 11:27:16 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Wow, you're the first person to offer me such a thing. Let's see what Odb or other have first, then I'll send you Zero.

Since you suggested that people should see the whole thing, here it is:

Spoiler, click to toggle visibilty
Re: Maverick Hunter Zero Help: Z Buster function
#13  April 15, 2019, 07:51:43 am
  • *****
  • Shame on you!
    • USA
You don't have State 205 listed. You don't have the changestates that put you into States 233 - 237.
Those states look identical except for the VarSet in each one. The Projectile can become a helper and reduce a lot of that down. And it'll increase compatibility with other chars in the future. You can still do your 2004/2005 ID if need be.
So how can I make Zero fire the shot at any of those levels when the button's released?
I'm not sure why you think it'd be different when it's exactly the same. I'm just pointing out it's redundant.

You move still has the ability to Set Var(3) to = 250, but no trigger once it DOES = 250.
It doesn't seem like you've edited anything in the last few days.

Projectiles are not your friend. Stop using projectiles. Once you learn how to make helpers easy, your editing skills will level up.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Maverick Hunter Zero Help: Z Buster function
#14  April 15, 2019, 09:44:47 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
I think I'm getting somewhere, finally. I changed the triggeralls from this:

Code:
[State 0, ChangeState]
type = ChangeState
triggerall = var(3) >= 150 && var(3) < 250
triggerall = var(3) >= 100 && var(3) < 150
triggerall = var(3) >= 50 && var(3) < 100
trigger1 = command != "hold_y"
value = 232

Into trigger1 and trigger2 like this:

Code:
[State 0, ChangeState]
type = ChangeState
trigger1 = command != "hold_y"
trigger1 = var(3) >= 50
trigger2 = var(3) >= 100
trigger2 = var(3) >= 150
value = 232

And Zero is now using his full buster shots at those var levels like he's supposed to. The thing is he does a full buster shot when the var goes to 150, and the var drops down to 0 like a stone.

https://streamable.com/w62jb

I think I'm getting closer. I just need to modify that code a little bit more. I've tried every combination I've thought of, even in numerical order, and this seems to be the best one.

I also need to modify these to make them trigger properly.

Spoiler, click to toggle visibilty

Let me try a few things. If you got anything in mind, let me know and I'll give it a shot. I'll holler in the Discord channel if I've got nothing.

Update: Okay, for the varsets at the end of state 232, I changed the triggerall into trigger1 and did the other triggers in numerical order.

Spoiler, click to toggle visibilty

I got this as a result:

https://streamable.com/9s5r4

I'm gonna try different orders and see if there's any change.
Last Edit: April 15, 2019, 10:59:23 am by RedDragonCats17
Re: Maverick Hunter Zero Help: Z Buster function
#15  April 15, 2019, 11:38:37 am
  • *****
  • Shame on you!
    • USA
Just clicked on this right before I'm passing out. I don't have time to really dig into everything for you, but
NO
NO NO NO NO NO!
Think about what this is saying
trigger1 = var(3) >= 50
trigger2 = var(3) >= 100
trigger2 = var(3) >= 150

If Var 3 is over 50 it's going to trigger right?
Is 150 over 50??
Read it out loud if you have to. SEE what the problem is here man. This is a major hiccup for you. 
Is 4,372 greater than 50?
Is 4,372 greater than 150?
Get why asking the 2nd and 3rd question dont fucking matter to Mugen yet??


I'll read the rest in about 18h or so when I get free time.
----
You're missing something very simple. I'm not sure what to tell you in order for you to understand. You need to think things through. Think things completely through to the end. You need to think, what's this particular trigger going to do. What does this particular trigger stop from happening. Do all of those things equal what I want. Think things ALL the way through.
Case in point.
Spoiler, click to toggle visibilty
If there's no projectile what trigger(S) will happen.
How are all of these VarSets similar?? Is there any part of the values that are exactly the same?? What's the end goal of doing the varset????
These 3 VarSets are exactly the same. When you have more than 1 thing that's exactly the same, that means it can become ONE thing.

Make ALL 3 of these VarSets into ONE VarSet. Post your answer.
vVv Ryuko718 Updated 10/31/22 vVv
Last Edit: April 16, 2019, 05:21:20 pm by Odb718
Re: Maverick Hunter Zero Help: Z Buster function
#16  April 17, 2019, 01:34:56 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Make ALL 3 of these VarSets into ONE VarSet. Post your answer.

While I was waiting for your reply, I did try to make those varsets into one. The problem is making a code for simply that. At first I thought a ifelse code could work, but I quickly realized that I know only 1 trick for ifelse, and I realized that ifelse isn't meant for what I was thinking it was for. So my problem is figuring out what works best. I'm looking at a reference of triggers, some of them I have used (except for AILevel, StageVar, and some of the math triggers), and at this point I was thinking about just using these brackets (||), but I thought that won't work either. So I'm sorry, but I don't have a answer for this. I believe this is gonna take a combination of you and some of the MUGENites that are just at the top, people who have been manipulating this very engine to such heights that even I cannot calculate.

Edit: I do know one thing's for sure, whatever you got in mind, it's possible that the trigger is going to have parentheses, or somehow make the brackets work in a way that I didn't even know or think of.

Edit 2: Hold up, I just remembered something. You, Odb, gave me this for my MegaMan Zero.

Code:
[State 0, VarSet]
type = VarSet
trigger1 = command = "b"
v = 13
value =ifelse(var(13)=0,1,(ifelse(var(13)=1,2,0)))
ignorehitpause = 1

I think a ifelse code is possible, the problem is the trigger1. Now I did make this using brackets:

Code:
[State 0]
type = VarSet
triggerall = command != "hold_y"
trigger1 = var(3) >= 50 || var(3) >= 100 || var(3) >= 150 && var(3) < 250
trigger2 = numproj != 0
var(3) = 0

I don't know if you approve of this, but you are my genius even in this very moment, so I'm sure you'll come up with a quick fix within a few seconds. So, I think I got the code for the value, I just need to change trigger1.

I did, however, fix this.

Code:
[State 0, ChangeState]
type = ChangeState
triggerall = command != "hold_y"
trigger1 = var(3) >= 150
trigger1 = var(3) >= 100
trigger2 = var(3) >= 50
value = 232

Now I will say this, at first I was stumped because I saw your reaction in the reply, and I did say it was working the way it's supposed to mostly, but I saw greater than things, so I rearranged the variables and they did the exact same thing. I changed the trigger for command != "hold_y" into a triggerall for experimentation, and Zero's Z Buster now functions the way it's supposed to, the thing is I have to make the varset function exactly how I want it to, and again, I've got nothing.
Last Edit: April 17, 2019, 09:16:57 am by RedDragonCats17
Re: Maverick Hunter Zero Help: Z Buster function
#17  April 17, 2019, 10:55:01 am
  • *****
  • Shame on you!
    • USA
I'm not sure if you know any algebra, but coding stuff for mugen is very similar.
a+b=c
Just like algebra you can reduce things down.
Spoiler: This can be reduced down (click to see content)
Notice that it's all the same thing that's scratched out?

Spoiler: delete duplicate code and reorder (click to see content)
Notice that all you're doing is minusing 50 from Var 3?

Spoiler: VarMinus? (click to see content)
Now ask yourself, do the three triggers need to be activated at different times? Should the var be subtracted 3 different times?? Once when you let go of y, once when there arent any projectiles, and another time if var(3) is = to, or over, 50??
Or do you only want to subtract it one time?


You're still not really looking at what you're typing.
trigger1 = var(3) >= 150
trigger1 = var(3) >= 100
trigger1 and trigger...1...
If var 3 is equal or greater than 100, say idk, 101, will trigger 1 fire off?? Post your answer.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Maverick Hunter Zero Help: Z Buster function
#18  April 18, 2019, 02:49:59 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Sure, I could've used a varadd instead of a varset to subtract the var(3), but there is one problem. If the var is somewhere in 70 or 80, and the varadd subtracts it, it'll lead us into some problems, like Zero going into state 231 after he's done with 232. We don't want to run into that issue again.

Part of the reason why I want to use a varset instead of a varadd is because after Zero fires the shot, I want the var to go to a specific number. Yes, I want it to be subtracted 3 different times.

About the changestate for 232, I tried the numerical order for the triggers, and to my surprise it's still working properly. It's strange too, it had a different effect the first time I tried it, but that's probably because I had the command trigger at the bottom and as trigger4, not triggerall like I have it now.

Code:
[State 0, ChangeState]
type = ChangeState
triggerall = command != "hold_y"
trigger1 = var(3) >= 150 && var(3) < 250
trigger2 = var(3) >= 100
trigger3 = var(3) >= 50
value = 232
Last Edit: April 18, 2019, 03:23:44 am by RedDragonCats17
Re: Maverick Hunter Zero Help: Z Buster function
#19  April 18, 2019, 11:28:46 am
  • *****
  • Shame on you!
    • USA
Sure, I could've used a varadd instead of a varset to subtract the var(3), but there is one problem. If the var is somewhere in 70 or 80, and the varadd subtracts it, it'll lead us into some problems, like Zero going into state 231 after he's done with 232. We don't want to run into that issue again.[/code]

Sounds like you'd just want to code state 232 a bit better.

Code:
[State 0, ChangeState]
type = ChangeState
triggerall = command != "hold_y"
trigger1 = var(3) >= 150 && var(3) < 250
trigger2 = var(3) >= 100
trigger3 = var(3) >= 50
value = 232
Dude. How can trigger 3 NOT happen, and trigger 1 happen??????
How can var 3 be 51, and you still check to see if it's over 100?????????
Think about this.
How does trigger 1 HAVE TO BE THERE if trigger3 is there???????

Quote and answer the question in red.
You have got to get this.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Maverick Hunter Zero Help: Z Buster function
#20  April 18, 2019, 11:52:17 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Dude. How can trigger 3 NOT happen, and trigger 1 happen??????

My answer: Now I'm confused.

What's wrong with it? It works fine. Zero fires the full shots when the var is at, or over, 50, 100, or 150, so trigger1 and trigger3 do happen. Are the other triggers not necessary? Do I have to make 1 fancy trigger or something? I'm stumped.

Could you put a comment somewhere on the code I posted and tell me what I should change or pitch (delete), or at least tell me what you're saying, please (gotta use my manners)? Because I am so confused right now.