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

Started by RedDragonCats17, April 03, 2019, 07:56:59 am

#### Afterthought

##### Re: Maverick Hunter Zero Help: Z Buster function
#21  April 18, 2019, 05:06:02 pm
• Discord: Afterthought#0021
RedDragonCats17 said:
Code:
`[State 0, ChangeState]type = ChangeStatetriggerall = command != "hold_y"trigger1 = var(3) >= 150 && var(3) < 250trigger2 = var(3) >= 100trigger3 = var(3) >= 50value = 232`

Why does var(3) need to be used in three different triggers? Do you realize you're saying the same thing three times when all you need to write is this?

Code:
`trigger1 = var(3) >= 50 && var(3) < 250`

You do realize 100 and 150 are both more than 50 and less than 250, right? You don't need those triggers. You're repeating the code unnecessarily. As it's written right now (and to my understanding), once trigger3 hits, nothing else will. It's not hard to grasp. Just condense it.

Amateur artist, graphic designer, and MUGEN experimenter.
Last Edit: April 18, 2019, 05:13:37 pm by Afterthought

#### RedDragonCats17

##### Re: Maverick Hunter Zero Help: Z Buster function
#22  April 18, 2019, 10:09:05 pm
I do want Zero to fire the full shot 3 times, and if this were to work the same way, I'd be stunned.

As of now, my eyes are on these:

Spoiler, click to toggle visibilty

Now Odb did suggest that I could use a varadd:

Code:
`[State 0]type = VarAddtrigger1 = command != "hold_y"trigger2 = numproj != 0trigger3 = var(3) >= 50var(3) = -50`

And I could have, but part of the reason why I want to a varset is because I want the variable to be subtracted to a specific number. If I use a varadd, and the variable is somewhere in 70 or 80, it's going to trigger state 231 after state 232 is finished. I want the variable to shoot down to exactly 100 if it's over or equal to 150, and down to exactly 50 if it's over or equal to 100, and et cetera,

Now I remembered that Odb gave me this for a switchable weapons system:

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

And at first I thought that a ifelse code would not work, but I found that and it could be a possibility. The problem is the trigger. I don't know a fancy trigger that'll give me the exact function that I want.
Last Edit: April 18, 2019, 10:14:17 pm by RedDragonCats17

#### Cyanide

##### Re: Maverick Hunter Zero Help: Z Buster function
#23  April 20, 2019, 12:59:00 pm
• Legendary XIII
• I am the eye of the storm to come!
I'm going to try and simplify this a bit as oh my god has it been made silly. We'll ignore stage 4 for the moment. It's easy to add in, but we're not going to do that now. If you are super attached to what you've done, don't delete it, but also, don't use it any more. Lets go to a new set of states.

I'm going to pick on 300.

Your initial state is a chargeup state. This is where you hold the button down. The length of time defines which z buster state you are sent to. We are going to split these up using TIME as the trigger. If you release the Y key while the time triggers are true you go to that state.

So

State 300

Full Power
Changestate
time >= 150
command != "hold_y"
Value = 303

2 shots
Changestate
time < 150
time >= 100
command != "hold_y"
Value = 302

1 shot
Changestate
time < 100
time >= 50
command != "hold_y"
Value = 301

Then, in state 303 we have a changestate at the end, that sends us to 302, so we do a second shot. In 302 we have a changestate that sends us to 301, so we do a 3rd shot. State 301 lets us go back to standing when it's done.

Yeah, that's not fancy, but it will work and doesn't use a variable right now. It doesn't include everything you want, but the way you code things isn't everything at once, it's 1 thing at a time. This bit is allowing for the charge up to happen, and fire off the number of shots depending on level. You need 4 states for this. The charge up, and 1 per projectile.

In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Last Edit: April 20, 2019, 01:03:53 pm by Cyanide

#### RedDragonCats17

##### Re: Maverick Hunter Zero Help: Z Buster function
#24  April 20, 2019, 01:42:02 pm
Here's the code.

Charge:

Spoiler, click to toggle visibilty

3 shots:

Spoiler, click to toggle visibilty

#### Odb718

##### Re: Maverick Hunter Zero Help: Z Buster function
#25  April 20, 2019, 01:49:25 pm
• Shame on you!
Spoiler: Same triggers are bad (click to see content)
vVv Wheat Stage Released vVv

#### Cyanide

##### Re: Maverick Hunter Zero Help: Z Buster function
#26  April 20, 2019, 01:54:51 pm
• Legendary XIII
• I am the eye of the storm to come!
Please don't add in extra stuff. That time >= 250 is NEVER going to be met because the time >= 150 will trigger before it. I didn't tell you to add it, and I don't know why you have.

To resolve your unmentioned issue, you want his second and 3rd shots to come out with  the push of a button rather than automatically. So we alter the shooting states as follows (also, why did you add prevstateno, I didn't say to put that in there, it's not meant to be there at all) Change state 232 as below.

[State 0, ChangeState]
type = ChangeState
trigger1 = time >= 10
trigger1 = command = "y"
value = 233

[State 0, ChangeState]
type = ChangeState
trigger1 = time >= 30
value = 0
ctrl = 1

I'm not going into buffers here, but that will give you a window of 20 ticks to tap Y again and fire the second shot. Repeat this for state 233 but NOT for 234.

In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

#### RedDragonCats17

##### Re: Maverick Hunter Zero Help: Z Buster function
#27  April 20, 2019, 01:55:27 pm
Gone.

Spoiler, click to toggle visibilty

------

Small problem: Zero is firing automatically.

I got rid of the var(3) in Zero's commands for the shots, and now Zero is automatically going to state 231.
Last Edit: April 20, 2019, 02:08:00 pm by RedDragonCats17

#### Odb718

##### Re: Maverick Hunter Zero Help: Z Buster function
#28  April 20, 2019, 02:30:33 pm
• Shame on you!
Post the changestate
vVv Wheat Stage Released vVv

#### RedDragonCats17

##### Re: Maverick Hunter Zero Help: Z Buster function
#29  April 20, 2019, 11:48:31 pm
Code:
`;---------------------------------------------------------------------------;Half Buster Shot[State -1, Half Buster Shot]type = ChangeStatevalue = 231triggerall = command != "hold_y"triggerall = command != "holddown"triggerall = time >= 10trigger1 = statetype = Strigger1 = ctrl`

#### Cyanide

##### Re: Maverick Hunter Zero Help: Z Buster function
#30  April 21, 2019, 12:44:11 am
• Legendary XIII
• I am the eye of the storm to come!
Where has state 231 come from. Why are you referencing it in the cmd? Honestly dude i want to help but you keep doing weird shit. You need 4 states. Thats it. You only need the changestates ive told you about.

In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

#### RedDragonCats17

##### Re: Maverick Hunter Zero Help: Z Buster function
#31  April 21, 2019, 01:01:44 am
State 231 is actually the half shot, which is player Zero's buster shot from X5. It originally triggers when the variable is greater than or equal to 10, but less than 50, now it's supposed to trigger with time since the variable is gone. I actually worked on this first before I started the other shots.

Originally, Zero was automatically going into either state 232 after I got rid of the variable in the command, but since I added the time trigger in the command, he's going into 231 instead.
Last Edit: April 21, 2019, 01:29:33 am by RedDragonCats17

#### Cyanide

##### Re: Maverick Hunter Zero Help: Z Buster function
#32  April 21, 2019, 01:15:09 am
• Legendary XIII
• I am the eye of the storm to come!
But we're not working on that bit are we. We're doing the simple charge mechanism. Take the changestate for 231 OUT of your cmd and take it out of the charge up. You don't even know what you've broken and i can't help you out when you break stuff by adding something new that wasn't in the original help.

Please do not add extra shit. Just stop doing that. We can add it when the ONE thing we are looking at works and you ask for a new feature to go in. Right now here is what you are making work

Press and hold y. If you hold it long enough you do 1 2 or 3 shots. Each shot requires an additional button press.

Thats all we're doing. Nothing else. Once you understand why that works we will do a SINGLE additional feature of your choice. We can repeat for each feature but you only get one at a time.

In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

#### RedDragonCats17

##### Re: Maverick Hunter Zero Help: Z Buster function
#33  April 21, 2019, 01:38:00 am
It's gone. Now it's just the full shots.

Now Zero does go into state 234 when the time reaches 50 ticks. The changestate for 233 works, I go into 233 when I press Y before 20 ticks, but we need to do something about 234.

#### Cyanide

##### Re: Maverick Hunter Zero Help: Z Buster function
#34  April 21, 2019, 01:44:00 am
• Legendary XIII
• I am the eye of the storm to come!
So the basic charge is working and you can transfer to the second shot with a button press but you get to the 3rd shot automatically. Repeat what you did in state 232 in state 233 but have that send you to 234 instead. I am also making the assumption that a button press is required for 2 shots as well.

Do i have that right? You really need to explain what things are doing and precisely what isn't doing what you want and why.

In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

#### RedDragonCats17

##### Re: Maverick Hunter Zero Help: Z Buster function
#35  April 21, 2019, 02:40:26 am
Zero does the third shot with a button press now, but he's still doing one shot automatically when the time reaches to 50 ticks.  I'd be standing around, in game, not pressing anything. The time is ticking, and once it reaches to 50, Zero enters state 234 automatically, so I need a way to fix this.

#### Cyanide

##### Re: Maverick Hunter Zero Help: Z Buster function
#36  April 21, 2019, 03:07:06 am
• Legendary XIII
• I am the eye of the storm to come!
Uhh. How are you getting into state 230? You push Y don't you? Do you not have a command to get you into the state in the first place?

In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

#### RedDragonCats17

##### Re: Maverick Hunter Zero Help: Z Buster function
#37  April 21, 2019, 03:27:06 am
Actually I do.

Code:
`;---------------------------------------------------------------------------;Charge[State -1, Charge]type = ChangeStatevalue = 230triggerall = var(30) = 0triggerall = command = "hold_y"triggerall = command != "holddown"trigger1 = statetype = Strigger1 = ctrl`

If you don't know what the variable is for, it was for something else I was working on. It's actually meant to separate this with the other thing which I'll tell you another time, unless you really want to know. For now, just pretend that it's not there.

#### Cyanide

##### Re: Maverick Hunter Zero Help: Z Buster function
#38  April 21, 2019, 04:03:49 am
• Legendary XIII
• I am the eye of the storm to come!
Well. That says you have to hold y to get to state 230. But you said it happens if you press nothing. Either that wasn't accurate or you have a terrible changestate somewhere else.

In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

#### RedDragonCats17

##### Re: Maverick Hunter Zero Help: Z Buster function
#39  April 21, 2019, 04:19:00 am
There isn't a changestate anywhere, this is all I got so far in the CNS

Spoiler, click to toggle visibilty

And the CMD:

Spoiler, click to toggle visibilty

Also, originally Zero enters state 234, I put the time triggerall into the command, and now Zero enters state 232. Here's a video for evidence.

https://streamable.com/29a8x

I'm not pressing anything what-so-ever. My hands were off the keyboard during the recording of the video, and Zero still does this.

#### Cyanide

##### Re: Maverick Hunter Zero Help: Z Buster function
#40  April 21, 2019, 04:44:54 am
• Legendary XIII
• I am the eye of the storm to come!
Your cmd is utterly wrong. Why are those there. You have state 230. Thats all you should have in the cmd. Are you paying any attention or just doing random shit?

Ill take a little blame for not addressing the cmd earlier but i don't get how set up a starting state has turned into additional commands being needed. All you're doing is making it harder on yourself.

In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.