YesNoOk
avatar

supports menu (Read 476 times)

Started by sgn15, November 25, 2011, 04:04:29 am
Share this topic:
supports menu
#1  November 25, 2011, 04:04:29 am
  • ***
Spoiler, click to toggle visibilty

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?
Re: supports menu
#2  November 25, 2011, 04:09:18 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: supports menu
#3  November 25, 2011, 04:17:48 am
  • ***
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
Re: supports menu
#4  November 25, 2011, 04:44:23 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: supports menu
#5  November 25, 2011, 07:51:06 am
  • ***
Spoiler, click to toggle visibilty

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?
Re: supports menu
#6  November 26, 2011, 06:25:30 am
  • ***
so what was making the infinite loop?
Re: supports menu
#7  November 26, 2011, 07:34:31 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: supports menu
#8  November 26, 2011, 09:39:02 am
  • ***
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?
Re: supports menu
#9  November 27, 2011, 12:42:47 pm
  • ***
cyanide, can you tell me how you would have coded a support menu? i really don't have an idea for this problem.
Re: supports menu
#10  November 27, 2011, 11:45:18 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: supports menu
#11  November 28, 2011, 07:23:54 am
  • ***
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 toggle visibilty

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 toggle visibilty

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
Last Edit: November 28, 2011, 07:39:00 am by sgn15
Re: supports menu
#12  November 28, 2011, 07:58:51 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: supports menu
#13  November 28, 2011, 08:08:23 am
  • ***
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?

Re: supports menu
#14  November 28, 2011, 08:14:29 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: supports menu
#15  November 28, 2011, 08:28:34 am
  • ***
; 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
Re: supports menu
#16  November 29, 2011, 04:03:00 am
  • ***
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
Re: supports menu
#17  November 29, 2011, 04:15:00 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: supports menu
#18  November 29, 2011, 04:50:16 am
  • ***
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 != ### ?
Re: supports menu
#19  November 29, 2011, 06:24:05 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: supports menu
#20  November 29, 2011, 06:43:20 am
  • ***
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.
Re: supports menu
#21  November 29, 2011, 07:04:22 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Then your helpers are not moving through it...

Look, i'm not going to do absolutely everything. You have the docs and can read up on things, you should also be drawing on prior experience (which i know you have because you've asked questions before)

I expect you to try what is given, and test stuff, not simply come back as soon as there is any problem at all. Come back when you think you HAVE tried everything and it's still not working.


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: supports menu
#22  November 29, 2011, 07:23:52 am
  • ***
the superpause with very long time is still in effect when i close the menu (and p1 is not in state 7001). i think you meant making another superpause with 1 tick time. that is how i did it now.
Re: supports menu
#23  November 30, 2011, 08:42:18 am
  • ***
i changed all down to fwd and up to back. then i wanted to add "arrows" for the menu, so i added these to the state 9001 (first option in menu)
Spoiler, click to toggle visibilty

and these are the states

Spoiler, click to toggle visibilty

the changestates in bold does not work. i figured they should work as the menu did. any ideas?
Last Edit: November 30, 2011, 09:37:09 am by sgn15
Re: supports menu
#24  November 30, 2011, 09:07:07 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Few stupid things. Unless you're having it read from statedef -1, don't give it keyctrl = 1.
These aren't attacks, you don't need movetype = A
Once more those commands must be in the cmd. fwd and back are not defaults. If those changestates are not working, there is every possibility those commands are not what you think they are.


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: supports menu
#25  November 30, 2011, 09:18:21 am
  • ***
huh? all codes are in state -1. i thought helpers can't access states -2 and -3 ?
ok i changed them to movetype = I, sorry about this, it is a quick copy paste first, forgot to adjust them after pasting.
the fwd and back commands already work for the menu (9001-9012) and it is already part of the default cmd commands (along with up and down commands i previously used for the menu)
Spoiler, click to toggle visibilty
the fwd and back work for menu but not for the arrows
Re: supports menu
#26  November 30, 2011, 09:45:46 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Helpers cannot access -1 unless keyctrl is set, unless there is a good reason to do so however they shouldn't.

In that case, your commands and changestates are both fine and set correctly. Therefore you troubleshoot and make sure that what you want to occur can happen in the character. And then that what you want to occur can happen in a normal helper, then reapply it to what you have and see at which point it actually breaks.

My guess is they can't move through the superpause...


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.