YesNoOk
avatar

How do I control a helper? (Read 26362 times)

Started by primordialgunna, September 27, 2023, 08:20:36 pm
Share this topic:
How do I control a helper?
New #1  September 27, 2023, 08:20:36 pm
  • *
    • USA
    • https://maid3n.neocities.org
I identify as High/Low. So don’t get it mixed up.
Last Edit: October 01, 2023, 07:01:28 pm by primordialgunna
Re: How do I control a helper?
#2  September 28, 2023, 07:38:19 am
  • *****
  • Shame on you!
    • USA
Put this in the helper. It may automatically work. Otherwise you can use StateDef -2 to make explods and have the helper watch for the explods
Code:
[State 0, VelSet]
type = VelSet
trigger1 = command != "x"
x = 0
y = 0

[State 0, VelSet]
type = VelSet
triggerall = command = "x"
trigger1 = command = "hldfwd"
x = 5
y = 0


[State 0, VelSet]
type = VelSet
triggerall = command = "x"
trigger1 = command = "hldback"
x = -5
y = 0
vVv Gouken718 vVv
Re: How do I control a helper?
#3  September 28, 2023, 02:23:31 pm
  • ****
    • Brazil
    • lyricasky.neocities.org
Re: How do I control a helper?
#4  September 29, 2023, 04:21:28 am
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org

I may be wrong, but should not these have a root redirect?

Only if the keyctrl argument for the Helper state controller is set to 0, otherwise the helper will read the root's commands by default; in that case, you'll want to make sure that the helper doesn't accidentally enter any states that you don't want it to, since it will also inherit whatever hardcoded behavior (ie: walking states) plus anything that's defined in Statedef -1 (which can be resolved by simply adding an !ishelper trigger for any changestates you don't want the helper to use). You're probably just better off leaving it at 0 and throwing on a root redirect to save yourself the extra work unless you know what you're doing.
Re: How do I control a helper?
#5  September 30, 2023, 07:48:24 pm
  • *
    • USA
    • https://maid3n.neocities.org
I got it to partially work. The helper is spawned in Statedef -3 by the way and it has it's own Statedef just above Statedef 195 (Back Dash).


Spoiler, click to toggle visibilty

Spoiler, click to toggle visibilty

So, the problem is it completely ignores the code on Statedef 6000, when keyctrl set to 0 and doesn't read my inputs. When I set it to 1, it copies the player's inputs, its animations, and ignores Statedef 6000 again. I used what Rice said with trigger = !ishelper on Statedef -1 moves and limited the helper to just walking but it still uses the player's anims, and I don't want it to jump and crouch with me.

Do I have to make states for the helper to go in in Statedef -1 for it work? If so, how do I go on about it? I already have a State -1 for Pebbler as well, but I'm unsure if it works. I appreciate the help

Spoiler, click to toggle visibilty
I identify as High/Low. So don’t get it mixed up.
Last Edit: September 30, 2023, 07:58:45 pm by primordialgunna
Re: How do I control a helper?
#6  September 30, 2023, 07:57:41 pm
  • ******
    • Portugal
    • network.mugenguild.com/pots/
It's much simpler to use redirects. Try this (without keyctrl):

Code:
[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 0
y = 0
 
[State 0, VelSet]
type = VelSet
trigger1 = root, command = "holdz"
trigger1 = root, command = "holdfwd" && root, command != "holdback"
x = 5
y = 0
 
[State 0, VelSet]
type = VelSet
trigger1 = root, command = "holdz"
trigger1 = root, command = "holdback" && root, command != "holdfwd"
x = -5
y = 0

Note that you need to add the "holdz" command to the cmd file.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.
Re: How do I control a helper?
#7  September 30, 2023, 08:40:51 pm
  • *
    • USA
    • https://maid3n.neocities.org
Oh, interesting. I added it and it worked, thank you for your help. I'll try to understand more about how root direct works.

I added triggerall = enemy,facing = -1 so the helper's controls doesn't invert when you are on the right side of the screen.

One last thing, does root direct work when adding attacks to the helper?
I identify as High/Low. So don’t get it mixed up.
Re: How do I control a helper?
#8  September 30, 2023, 08:46:28 pm
  • ******
    • Portugal
    • network.mugenguild.com/pots/
That facing check should probably also be made in relation to the root instead of the enemy. Or more like you should compare the helper's facing to the root's facing to decide which way is forward.

Quote
One last thing, does root direct work when adding attacks to the helper?
What do you mean? If it's still about inputs it works the same as this case.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.
Re: How do I control a helper?
#9  September 30, 2023, 09:25:35 pm
  • *
    • USA
    • https://maid3n.neocities.org
Alright, it makes much more sense now. Also, how do you make it so it has an animation tied to it?

Quote
What do you mean? If it's still about inputs it works the same as this case.

Yes, that's what I meant. Thank you.
I identify as High/Low. So don’t get it mixed up.