YesNoOk
avatar

Numbered Palette Selector help (Read 973 times)

Started by Sir Ghostler, December 26, 2016, 06:41:30 am
Share this topic:
Numbered Palette Selector help
#1  December 26, 2016, 06:41:30 am
  • ***
  • Working on MUGEN characters, 24/7.
    • Australia
So I'm wanting to create a palette selector that displays the number of the palette that is currently hovered over/highlighted during selection. Like this for example:

Spoiler, click to toggle visibilty

How would I go about coding this thing? I haven't really tried making a palette selector before, so I don't know where to start. Any and all help would be appreciated.
Last Edit: December 28, 2016, 01:56:38 pm by ゴーストキラー
Re: Numbered Palette Selector help
#2  December 26, 2016, 08:57:25 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You can do it as a helper or an explod, Explod is possibly slightly easier. The only thing to remember is that you can't hit anything other than directions during the intro.

Use a variable, increment it when you hit up, decrease it when you hit down.

varadd
trigger1 = command = "holdup"
var(0) = 1
persistent = 2

varadd
trigger1 = command = "holddown"
var(0) = -1
persistent = 2

Use varsets to revert it to 20/0 respectively when it hits those values and you press the corresponding direction. Line all your explods up animation wise starting from a set value say

anim 6000
to
anim 6020

Then your explod in the intro sequence can be set up as

type = explod
trigger1 = 1
anim = 6000+var(0)
removetime = 1
time = 1

It will change as the variable changes. You will also need to assertspecial the Intro flag while this is occuring. You can use left or right as "selectors" if you want so pressing either of those sends you to state 0 with no control, effectively ending the assert special

Finally you have to use the remappal sctrl (instructions in the docs for specifics) and simply assign the palette based on the variable. This doesn't need to be asserted all the time, so doing it the once in the intro is enough, no need for -2.

remappal
trigger1 = 1
source = 1,1
dest = 1,var(0)

I have actually done something a little like this in Lee Rekka if you wanted to take a look. It's a mode change, but his palette changes too.


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: Numbered Palette Selector help
#3  December 26, 2016, 04:30:24 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
You can also hit the "Start" button without ending the intro.

In my character, I coded that input to "confirm" the palette selection (pal selector destroyself)

Re: Numbered Palette Selector help
#4  December 26, 2016, 04:35:04 pm
  • avatar
  • ***
  • Original characters are my forte.
    • http://network.mugenguild.com/bane84/
You can do it as a helper or an explod, Explod is possibly slightly easier.

I think it's also worth noting that you'll need to "refresh" any Explods on every tick by removing them (only if their ID is detected) before re-creating them.

You can also hit the "Start" button without ending the intro.

Oh, you.  I was just getting ready to say this same thing.

You beat me to it.  :P
Re: Numbered Palette Selector help
#5  December 28, 2016, 01:55:49 pm
  • ***
  • Working on MUGEN characters, 24/7.
    • Australia
Thanks for all your help, guys! Using your guidance, the Expanded Docs section, and another character for reference, I've managed to build the selector I wanted! I'll post back here if I run into any issues with it later on, but until then this topic is solved. Thank you all again for your help and input! I really appreciate it. :)