supports menu

Started by sgn15, November 25, 2011, 04:04:29 AM

Previous topic - Next topic

sgn15

Spoiler (click to show)
;---------------------------------------------------------------------------
[Statedef 7000]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
anim = 7000

[State 0, 5]
type = ChangeState
trigger1 = animtime = 0
value = 7001
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 7001]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
anim = 7001

[State 0, SuperPause]
type = SuperPause
trigger1 = time = 0 ;animelem = 1
time = 100
anim = -1
;sound = S10,0
;pos = 0,0
movetime = 100
darken = 0
p2defmul = 0
poweradd = 0
unhittable = 1
;ignorehitpause =
;persistent =

[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "Support Selector"
ID = 8001
stateno = 8001
pos = 160,-50
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
size.xscale = 1.0
size.yscale = 1.0
;ignorehitpause =
;persistent =

[State 0, 5]
type = ChangeState
trigger1 = var(0) = 0
value = 0
ctrl = 1



;---------------------------------------------------------------------------
[Statedef 8001]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8001

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 1
;ignorehitpause =
;persistent =

; corresponding attack state of this helper
[State 0, ChangeState]
type = ChangeState
trigger1 =root, command = "a" && stateno = 7001
value = 8050
ctrl = 0

; next option in support menu (down)
[State 0, ChangeState]
type = ChangeState
trigger1 =root, command = "down"
value = 8002
ctrl = 0

; next option in support menu (up)
[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8012
ctrl = 0

this is my attempt at making a supports menu for p1 from scratch. just started.
all supports are "attack and disappear" type
states 8001 to 8012 are only portraits (the menu itself, one portrait at a time). i only showed state 8001 but the other states are similar in code structure
state 7000 is just for animation
7001 is the p1 state for supports menu (7001 has only 1 frame).
what is the appropriate trigger for the changestate ? i want to changestate when any of the supports have been chosen (command a) or any attack state of the supports have been activated/used by the chosen support
and the command up and down actually does not work?

Cyanide

var(0) will be 0 as soon as you enter the state for the first time. Why not use command = "a" or whatever?

up and down are not commands by default, you'll have to actually make them first.


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.

sgn15

i removed the superpause in 7001

then changed trigger to this

[State 0, 5]
type = ChangeState
trigger1 = command = "b"
value = 0
ctrl = 1

that changestate works now.

i used up and down as commands because i saw them here in cmd of the same char. i thought those were for movements of p1. those work differently?

Quote;-| Single Dir |------------------------------------------------------------
[Command]
name = "fwd" ;Required (do not remove)
command = $F
time = 1

[Command]
name = "downfwd"
command = $DF
time = 1

[Command]
name = "down" ;Required (do not remove)
command = $D
time = 1


[Command]
name = "downback"
command = $DB
time = 1

[Command]
name = "back" ;Required (do not remove)
command = $B
time = 1

[Command]
name = "upback"
command = $UB
time = 1

[Command]
name = "up" ;Required (do not remove)
command = $U
time = 1

Cyanide

lol, ok sorry i missed something. The commands work fine. The problem is

supermove
pausemove

You don't tell it yes or no, you just have words there. Both superceded by supermovetime and pausemovetime. Please refrain from using the doubleclick controls if you're not going to fill out all the fields. Just cos an = sign isn't there doesn't mean there shouldn't be one.


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.

sgn15

Spoiler (click to show)
;---------------------------------------------------------------------------
[Statedef 8001]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8001

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 1
;ignorehitpause =
;persistent =

; corresponding attack state
[State 0, ChangeState]
type = ChangeState
trigger1 =root, command = "a" && stateno = 7001
value = 8004
ctrl = 0

; next option in support menu (down)
[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8002
ctrl = 0

; next option in support menu (up)
[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8012
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 8002]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8002

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 2
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8003
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8001
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 8003]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8003

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 3
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8004
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8002
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 8004]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8004

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 4
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8005
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8003
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 8005]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8005

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 5
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8006
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8004
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 8006]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8006

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 6
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8007
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8005
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 8007]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8007

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 7
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8008
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8006
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 8008]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8008

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 8
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8009
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8007
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 8009]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8009

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 9
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8010
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8008
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 8010]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8010

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 10
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8011
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8009
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 8011]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8011

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 11
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8012
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8010
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 8012]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 8012

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 12
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down"
value = 8001
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up"
value = 8011
ctrl = 0

ok i removed both lines from helper sctrl. i tried it so far. when i press up or down, it says infinite loop at state 8007 ? there is not even a changestate to 8007 in state 8001 (first default menu helper state)

did i overlooked something?

sgn15

so what was making the infinite loop?

Cyanide

I have no idea. Change your triggers. Possibly time > 0 would make things work properly.


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.

sgn15

time > 0 for the helper sctrl? i tried it already with triggerall numhelper(#) < 1. same problem
i dont think the vars are related to the problem/ i tried changing the commands to x and y or fwd and back. same problem
since it keeps saying 8007 infinite loop, i tried removing state 8007 and run it. when i press up once, helper portrait goes to 8007 (in debug mode, anim is 8008 and state is 8007, but i check the portrait and it is for 8008 and there is no state 8007 since i removed it before running mugen) and it is stuck there forever and i noticed it has shadow already (it has assertspecial so its not supposed to have shadow)

for down, it says in debug mode, anim is 8006 and state is 8007 (same problem, anim is for 8006 and there is no state 8007 in cns). shadow is also there.

does that give you any ideas?

sgn15

cyanide, can you tell me how you would have coded a support menu? i really don't have an idea for this problem.

Cyanide

Normally an infinite loop is when something stays in the state more than 2500 times. Unless you have another 8007 that you're not thinking about it's got to be with changestate triggers. You've done basically what i would have done, you just haven't locked things down as much as i would. For example i'd be using command = "up" && command != "down" just to prevent it doing odd things, that sort of thing.

If it's not working as it is, cut it down and test it state by state. Don't try and do it all at once.


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.

sgn15

#10
i have checked long ago for 8007 using ctrl + F and i only found the changestate in statedefs 8006 and 8008 and the anim and statedef values of state 8007.

now i changed them all to 9001-9012 (both state and anim numbers)

and also changed it as you said

; next option in support menu (down)
[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down" && root, command != "up"
value = 9002
ctrl = 0
persistent = 0

; next option in support menu (up)
[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up" && root, command != "down"
value = 9012
ctrl = 0
persistent = 0

and i tested it with only states 9001 and 9002. it works. then i add state 9003, when i press down only once, it goes to 9003. so either it skips 9002 or it goes to 9002 too fast and directly goes to 9003. since i have a changestate to 9003 only in state 9002, i think it works too fast.

As i add more states one by one, it will work this way until 9012. so 9012 is the source of infinite loop error.

Spoiler (click to show)
;---------------------------------------------------------------------------
[Statedef 9012]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 9012

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 12
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down" && root, command != "up"
value = 9001
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up" && root, command != "down"
value = 9011
ctrl = 0

anything wrong with state 9012 ?

and i thought 9012 was the source of error, so for testing of the up of 9001 (which is supposed to go to the last state 9012), i changed the destination state to 9011 and tried again. this time the same damn problem about infinite loop for 9007 came up again.

here are all codes with 9007

Spoiler (click to show)
;---------------------------------------------------------------------------
[Statedef 9006]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 9006

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 6
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down" && root, command != "up"
value = 9007
ctrl = 0
persistent = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up" && root, command != "down"
value = 9005
ctrl = 0
persistent = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, stateno != 7001
;ignorehitpause =
;persistent =

; corresponding attack state
;[State 0, ChangeState]
;type = ChangeState
;trigger1 =root, command = "a" && stateno = 7001
;value = 9500
;ctrl = 0

;---------------------------------------------------------------------------
[Statedef 9007]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 9007

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 7
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down" && root, command != "up"
value = 9008
ctrl = 0
persistent = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up" && root, command != "down"
value = 9006
ctrl = 0
persistent = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, stateno != 7001
;ignorehitpause =
;persistent =

; corresponding attack state
;[State 0, ChangeState]
;type = ChangeState
;trigger1 =root, command = "a" && stateno = 7001
;value = 9500
;ctrl = 0

;---------------------------------------------------------------------------
[Statedef 9008]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 9008

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noautoturn
flag2 = noshadow
flag3 = timerfreeze
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 0
value = 8
;ignorehitpause =
;persistent =

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "down" && root, command != "up"
value = 9009
ctrl = 0
persistent = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = root, command = "up" && root, command != "down"
value = 9007
ctrl = 0
persistent = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, stateno != 7001
;ignorehitpause =
;persistent =

and also, when p1 cancels the menu using command = "b", the menu should destroyself and all states have noshadow too.
both destroyself and noshadow does not work when i try to cancel the menu.
destroyself and noshadow both work when i open the menu and close it again without using up or down commands

those are as much info as i have gathered. pls reply. thanks

edit: one more problem, when i press down, so it goes to the last option on the menu instead of the next one on the menu, after that, it gets stuck there forever, press up or down does not do anything. so yeah that is another problem i noticed

pls reply

Cyanide

Use time > 0 for all your changestates. We'll work on the rest once you've done that.


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.

sgn15

the changestates with command up and down? like this ?

; next option in support menu (down)
[State 0, ChangeState]
type = ChangeState
trigger1 = time > 0 ;root, command = "down" && root, command != "up"
value = 9002
ctrl = 0
persistent = 0

; next option in support menu (up)
[State 0, ChangeState]
type = ChangeState
trigger1 = time > 0 ;root, command = "up" && root, command != "down"
value = 9012
ctrl = 0
persistent = 0

it goes very fast from 9001 to 9011 (i dont have state 9012 in cns, i removed it) and stops there
both destroyself and noshadow still does not work when i try to cancel the menu.
what do i do next?


Cyanide

No not like that. Ack. Please, don't just do EXACTLY what i say. You have a problem where up/down are giving you VERY quick changes causing an infinite loop. Time > 0 will force the state to wait 1 tick and HOPEFULLY let you release the key between presses.

Also, i am not working on any other bit of it until you work out the movement...


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.

sgn15

; next option in support menu (down)
[State 0, ChangeState]
type = ChangeState
triggerall = time > 0
trigger1 = root, command = "down" && root, command != "up"
value = 9002
ctrl = 0
persistent = 0

; next option in support menu (up)
[State 0, ChangeState]
type = ChangeState
triggerall = time > 0
trigger1 = root, command = "up" && root, command != "down"
value = 9012
ctrl = 0
persistent = 0

the menu works now. ill post here later when i try add the attack states and have problems. thanks

sgn15

what should i use to make the p1 menu state act like a superpause (for p2 to be not able to move) during the menu?
i tried pause and superpause but it did not prevent p2 from moving

Cyanide

The only way p2 can move through a superpause is if you didn't turn on a superpause. Or if it doesn't last long enough. 100 ticks based on your first bit is not actually a hugely long time.

But then i don't know what your code looks like now considering it's been changed a lot..


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.

sgn15

yeah i actually removed that original superpause long ago and now after the menu worked well, i added a new one. is it possible to make the whole state always in superpause? i mean it is like time = -1 (forever) and superpause only stops when i am not in state 7001 anymore?

kind of act like explods with removetime = -1 and removeexplod when stateno != ###. or helper with destroyself when parent, stateno != ### ?

Cyanide

you'd do a 2 tick pause that is reasserted every tick. Or a tremendously long one, which is reasserted to 1 when you want it to finish.


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.

sgn15

like this?

[State 0, Pause]
type = Pause
trigger1 = 1
time = 2
movetime = 2
;ignorehitpause =
;persistent =

or this?



[State 0, SuperPause]
type = SuperPause
trigger1 = 1
time = 2
anim = -1
;sound = S10,0
;pos = 0,0
movetime = 999999999999
darken = 0
p2defmul = 0
poweradd = 0
unhittable = 1
;ignorehitpause =
;persistent =

what do you mean by "reasserted" ?
i can't press properly the up and down for the menu because of the superpause.