YesNoOk
avatar

Problems with a "Spam the button" type special move (Read 198 times)

Started by Rabano, September 22, 2022, 08:29:59 PM
Share this topic:
Problems with a "Spam the button" type special move
#1  September 22, 2022, 08:29:59 PM
  • avatar
  • **
    • Argentina

  • Online
I want to give a character a move similar to E.Honda's Palms or Chun Li's kicks, where the only way to activate it is spamming a button (in this case one of the three punches)

I copied the code from another char but it doesn't work, nothing happens.

this is the coding:
Spoiler, click to toggle visibilty
And this is the command:

[State -1, Bakuretsuken]
type = ChangeState
value = 1300
triggerAll = !AILevel
triggerAll = (command = "x" || command = "y" || command = "z") && var(45) >= 5
triggerAll = RoundState = 2 && StateType != A
trigger1 = ctrl || StateNo = 40 || StateNo= 52 || (StateNo = [100,101])
trigger2 = var(6)


Someone know's what Im doing wrong?
Last Edit: September 22, 2022, 11:13:47 PM by Odb718
Re: Problems with a "Spam the button" type special move
#2  September 22, 2022, 11:12:53 PM
  • *****
  • Shame on you!
    • USA
So you might have a variable being changed outside of that state, or started too low to activate it up.
And when you say nothing happens, Does the char go into State 1300 at all??

Use DisplaytoClipboard to show the Vars you're using. You'll be able to tell if you're too slow or that the move just isn't working.

One thing you can do to test if you're slow, is add a 0 to each of the times of the animation. So if frame 1 is 3 tics, set it to 30 tics. This way you get 10 times as long to get the move off. Then when you're done and it works, you can delete the 0 going from 30 back to 3 easily.
vVv Mauru Mauru Released vVv
Re: Problems with a "Spam the button" type special move
#3  September 23, 2022, 12:07:12 AM
  • avatar
  • **
    • Argentina

  • Online
Can you tell me how I open the DisplaytoClipboard thing? Im new to this character creation thing. I also did what you told me to do with the tics and it still doesn't work.

Also it doesn't go into state 1300 at all, its like the move isn't there.
Re: Problems with a "Spam the button" type special move
#4  September 23, 2022, 01:58:09 AM
  • *****
  • Shame on you!
    • USA
so one test I do when a move just wont work is I change the ChangeState for State 200. Standing Light Punch usually, to the move I need to test.
You KNOW state 200 will activate when you press X, so if you change the 200 to 1300 you KNOW it should enter 1300.
If  you make that change and it doesn't look like it enters state 1300, that almost always means the changestate at the end of 1300 is firing off immediately.
If you change it to 1300 and it doesn't enter the state, change the changestate from !AnimTime to time >= 110. Then see what happens.

You might want to use Debug also. Press Ctrl+D and some info should pop up.

This is the Master Class link for DisplaytoClipboard
https://mugenguild.com/forum/topics/displaytoclipboard-and-appendtoclipboard-sctrl-169988.0.html

You'll want something like

[State -2, Clipboard]
type = DisplayToClipboard
trigger1 = 1
text = "10 = %d  11 = %d  13 = %d  35 = %d  46= %d  "
params = Var(10), Var(11), Var(13), Var(35), Var(46)

in statedef -2
vVv Mauru Mauru Released vVv
Re: Problems with a "Spam the button" type special move
#5  September 24, 2022, 03:33:44 PM
  • ******
  • The Snow King of North Pole
  • We both can't be Kings, tubby. There can be only 1
    • Chile
    • network.mugenguild.com/basara/
[State -1, Bakuretsuken]
type = ChangeState
value = 1300
triggerAll = !AILevel
triggerAll = (command = "x" || command = "y" || command = "z") && var(45) >= 5
triggerAll = RoundState = 2 && StateType != A
trigger1 = ctrl || StateNo = 40 || StateNo= 52 || (StateNo = [100,101])
trigger2 = var(6)
Didn't see what your CNS has, but for me, your mistake was there in CMD. Let me put my attempt on rapid punches/kicks I use in some of my chars:
Code:
[Command]
name = "tkick_a"
command = a, a, a, a
time = 30

[Command]
name = "tkick_b"
command = b, b, b
time = 30

(...)
;Thunder Kick Debil
[State -1, TK1]
type = ChangeState
value = 1200
triggerall = command = "tkick_a"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact

;Thunder Kick Fuerte
[State -1, TK2]
type = ChangeState
value = 1250
triggerall = command = "tkick_b"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
This is what I use for rapid punches/kicks, this is part of the code of my Reiji Oyama (who also has a Flash Kick move as Chun-li). The code in CNS is like a normal move, so there shouldn't be a problem To make a rapid attack, all depends of the CMD since it's the thing that triggers the move, so with that command, you can make the move all you want since the CMD says CNS that keep making the move in a loop since you keep pushing the buttons.

Try this, it would be easier to make that move ;)