YesNoOk
avatar

best var for temporarily removing chars control input? (Read 3375 times)

Started by Memo, July 27, 2016, 10:46:57 pm
Share this topic:
Re: best var for temporarily removing chars control input?
#21  July 28, 2016, 11:42:18 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I would have used statedef 1 as the fancy state and you go straight to that from 5900/190. Then you never need to enter it again and don't have to mess round with state 0 at all or change any coding to point at state 1.


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.
Re: best var for temporarily removing chars control input?
#22  July 28, 2016, 12:03:34 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
I would have used statedef 1 as the fancy state and you go straight to that from 5900/190. Then you never need to enter it again and don't have to mess round with state 0 at all or change any coding to point at state 1.
Cyanide your about to make me me get out of bed and try it, great idea I should of thought of that but I thought mugen automatically puts you in state 0. Thanks for the tip I'm definitely trying it sounds like it would work out great
Re: best var for temporarily removing chars control input?
#23  July 28, 2016, 12:06:42 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Might need to pass through 0 at least once to start the round, but you can do that based on prevstateno still.


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.

lui

Re: best var for temporarily removing chars control input?
#24  July 28, 2016, 12:24:58 pm
  • *****
    • USA
pardon me if this is off-topic but is this for cvs: alpha?

if so im so glad youre workin on it again memo, keep grinding man!
Re: best var for temporarily removing chars control input?
#25  July 28, 2016, 12:33:24 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
pardon me if this is off-topic but is this for cvs: alpha?

if so im so glad youre workin on it again memo, keep grinding man!

It sure is, once I get this finished I have a couple other ideas I want to try. Its gonna have a different name and control scheme I've never tried before.
Re: best var for temporarily removing chars control input?
#26  July 28, 2016, 05:49:20 pm
  • ******
    • www.justnopoint.com/
I didn't even consider skipping the intro stuff all together. Great idea!

And Memo, if this solved your issue do not forget to marked the topic as solved.
Re: best var for temporarily removing chars control input?
#27  July 28, 2016, 05:53:52 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
I didn't even consider skipping the intro stuff all together. Great idea!

And Memo, if this solved your issue do not forget to marked the topic as solved.

I almost got it solved...ill let yall know once I drive my girl to work I dont want to hear the old "your always on the computer" thing haha. I bet everybody here who has a GF hears that shit..
Re: best var for temporarily removing chars control input?
#28  July 28, 2016, 06:01:31 pm
  • ***
  • ^First attempt ain't so bad......
    • buckus.mugen-infantry.net/
Re: best var for temporarily removing chars control input?
#29  July 28, 2016, 06:07:57 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
I followed the steps in this guide by rednavi to achieve non skip-able intros (and remove ctrl from players completely. I use a var for ctrl) for my full game.

http://mugenguild.com/forum/topics/fullgame-coding-guide-undocumented-and-noncommonly-known-problems-102062.0.html

Yo what up Buckus! Man I've been reading that thing for years and I can understand most of it besides the var part.
I'm just not sure how they should be coded, placed ect. Mind posting an example of your set up? Off topic hows the game coming along?
Re: best var for temporarily removing chars control input?
#30  July 28, 2016, 07:43:22 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
it only works if I skip state 0 for everything, I'm gonna start coding all the mugen special states that are not in the common.def and post more progress later.
before I solve this thread I want to make sure it works correctly transitioning from fight to the next. if you guys have any more tips or some
code for me to look at ill appreciate it
Re: best var for temporarily removing chars control input?
#31  July 29, 2016, 05:37:15 am
  • ******
    • www.justnopoint.com/
PM me what you have because it sounds way over complicated to replace state 0. I'm sure there is a way to do it with state 1. I'd like to take a look. I have some ideas in my head.
Re: best var for temporarily removing chars control input?
#32  July 30, 2016, 05:52:21 am
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
@Just No Point: Dude I want to PM you a copy of my mugen so you can check it out, it'll be alot easier than posting code up here(most of my time here is on my phone) I had it working for a while then the system broke after I did some other stuff to it but I started it over again and I'm at the point I was at yesterday only this time I figured out how to do it without a special stand state, fuck yea I get to keep state 0 dont have to change all the changestates that go to 0, ill try to upload it soon and send you a link sometime soon
Re: best var for temporarily removing chars control input?
#33  August 02, 2016, 10:46:02 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
https://www.sendspace.com/file/ud0v6b  @Just No Point: this is my mugen, just open up joe and the common.def in fighter factory.
everythings in the common, 5900 goes straight to statedef 0 and that's where the magics supposed to happen. if anybody else wanna help
please do I really need it!
Re: best var for temporarily removing chars control input?
#34  August 04, 2016, 03:52:33 am
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
ok so I made some changes so it looks better heres what ive done


first i got these settings in my fight.def

start.waittime = 1         
ctrl.time = 5

my statedef 5900 has a changestate to state 11190 my pre vs
screen state its blank nothing cool happening here
Spoiler, click to toggle visibilty


my state 11190! supposed to go to statedef 11191 my vs screen but mugens retarded
Spoiler, click to toggle visibilty


my vs screen
Spoiler, click to toggle visibilty


now since mugen acts weird in roundstate 1 i have another changestate in statedef 0 to go to
my vs screen statedef 11191 if the prevstateno was 11190
Spoiler, click to toggle visibilty


now i have it working but theres still that 1 tick in the begining that breaks the system
im trying if you mash buttons or hold a direction during that 1 tick in the begining.
i finally posted this just so yall can see the code and see what i can do to make it work better.
hopefully show me were to put some vars to completly remove control during that 1 tick



Re: best var for temporarily removing chars control input?
#35  August 19, 2016, 10:31:59 am
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
Yeah, you have to use a pause outside of a full game. That's what Tamago did with his R. Mika anyway.

so how did tamago do it with pause? I'm testing his r. mika and I can skip all her intros
Re: best var for temporarily removing chars control input?
#36  September 25, 2016, 03:18:06 am
  • **
  • Don't copy code if you don't understand it.
    • USA
    • a13rown@hotmail.com
Hey memo,

I know this topic is kind of old, but I can try to share with you what I did in my street fighter game. Other people my have different ways,
but this is how I got mines to work.  Computer Science was not my major in college. (LOL)
However, just a reminder:  Everything is happening in roundstate = 2.
I will try make this as simple as possible, so just bare with me:

First, in state 5900 add this state controller:
I used this state controller so the character would immediately go into state 0.
[State 5900, Changestate]
type = ChangeState
trigger1 = 1
value = 0

Next,  I used a floating variable to determine when to allow the players to have control. This will be in statedef -2.
I just decided to use a float.  It doesn't matter if you use a variable or float variable.

[State -2, No Skipping Intro Timer]
type = VarAdd
trigger1 = RoundState = 2
trigger1 = fvar(0) = [0,133]
fv = 0
value = 1
ignorehitpause = 1

The purpose of this state controller is to keep make sure that Fvar(0) stops after it reaches 133 ticks.  This is also in statedef -2.

[State -2, No Skipping Intro Timer]
type = VarAdd
trigger1 = RoundState = 2
trigger1 = fvar(0) >= 133
trigger1 = stateno = 0
trigger1 = enemy,stateno = 0
fv = 0
value = 1
ignorehitpause = 1

The purpose of this state controller is to keep make sure that Fvar(0) will
continue to increase after the player and the enemy's introduction is finished.
This is also in statedef -2.

[State -2, Release Control]
type = VarSet
trigger1 = fvar(0) >=300
fv = 0
value = 300

This is also in statedef -2.  It forces the character to go into state 190 after he is in state 0. I also
have an explod animation covering the entire screen until about 16 ticks.  That is why I have it starting around 15.

[State -2, ChangeState]
type = ChangeState
triggerall = fvar(0) = 15
triggerall = numpartner = 0
trigger1 = RoundNo = 1
trigger1 = stateno = 0
value = 190
ctrl = 0
ignorehitpause = 1

Once fvar(0) is 300 or greater, both players will regain control.

Now, after both characters finish their intro, from tick 133 to 300 is when my round call helper is released.
This is just to give the announcer enough time to say "ready? Fight!" or whatever.
Once Fvar(0) reaches 300, everyone has control.

Next, in all of my characters, I had to add a triggerall = FVAR(300) in statedef -1 state controllers. This is my way of keeping the characters from
doing anything while in roundstate = 2 until Fvar(0) = 300,for example:

[State -1, light punch]
type = ChangeState
value = 200
triggerall = fvar(0) = 300
triggerall = statetype != A && command = "x" && command != "holddown"
triggerall = P2bodydist X <= 30
trigger1 = ctrl

Finally, to be on the safe side, (may not be necessary) I added a ctrlset state controller in state 0:

[State 0, ]
type = ctrlSet
triggerall =  RoundState < 3
trigger1 = fvar(0) < 300 ;----- this line here
value = 0

[State 0, ]
type = ctrlSet
triggerall =  RoundState = 2
trigger1 = fvar(0) = 300 ; ------this line here
value = 1

and in state 20 again (may not be necessary)

[State 20, 1]
type = ctrlSet
triggerall =  RoundState < 3
trigger1 = fvar(0) < 300 ; ------this line here
value = 0

[State 20, 1 ]
type = ctrlSet
triggerall =  RoundState = 2
trigger1 = fvar(0) = 300 ; ------this line here
value = 1


Well, this is how I got mine to work. It might be kind of complicated but I cannot skip the intro screen.
I hope this helps some.