YesNoOk
avatar

How do I add multiple taunts as Random? (Read 68198 times)

Started by Tiger-Boy, July 18, 2022, 04:36:21 am
Share this topic:
How do I add multiple taunts as Random?
New #1  July 18, 2022, 04:36:21 am
  • ***
  • "I'm Bal... I'm Veg...*Sigh* Just call me 'Claw'."
So, the character I am working on, has 3 Taunts, all with animations and sounds.

I believe all 3 to be good, but I can choose only one.

But is there a way for me to use all three, and the system chooses one of the taunts at random during gameplay?

Here are the codes:
Spoiler, click to toggle visibilty
"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE
Last Edit: August 13, 2022, 02:32:01 am by Tiger-Boy

GT

Re: How do I add multiple taunts as Random?
#2  July 18, 2022, 06:58:45 am
  • *****
    • USA
    • Skype - gt_ruby
Use different (sequential [195, 196, 197...]) statedef numbers for each taunt. Locate the command for taunt in the statedef -1 portion of the command file and use the statedef number of the first taunt as a value with the random trigger with the Remainder operator and the total amount of taunts wanted as the divisor of random.

Code:
[State -1, Taunt]
type = ChangeState
value = 195 + (random%3) ; The expression in the parenthesis will return a number between 0 and 2.
triggerall = statetype = S
triggerall = command = "start"
trigger1 = ctrl
Yeah Titiln, in fact, You Made Him
Last Edit: July 18, 2022, 07:05:39 am by GT
Re: How do I add multiple taunts as Random?
#3  July 18, 2022, 06:05:11 pm
  • ***
  • "I'm Bal... I'm Veg...*Sigh* Just call me 'Claw'."
Use different (sequential [195, 196, 197...]) statedef numbers for each taunt. Locate the command for taunt in the statedef -1 portion of the command file and use the statedef number of the first taunt as a value with the random trigger with the Remainder operator and the total amount of taunts wanted as the divisor of random.

Code:
[State -1, Taunt]
type = ChangeState
value = 195 + (random%3) ; The expression in the parenthesis will return a number between 0 and 2.
triggerall = statetype = S
triggerall = command = "start"
trigger1 = ctrl

Thank you!

I managed to use diferent sequestial numbers for the taunts, as advised:

Spoiler, click to toggle visibilty

But I cant find the command for taunt in the statedef -1. In fact, I cant find it in this or any cns files.
How should I search for it?
"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE
Re: How do I add multiple taunts as Random?
#4  July 18, 2022, 07:35:07 pm
  • *****
  • Shame on you!
    • USA
You'd create it.
I'd personally put it at the bottom, of the top, of the list of commands. Start is usually premade. But put it under the regular button presses. This way the taunt has the lowest priority.
The only way I'd want a random taunt would be if they were all the same length of time. Being open for a random period of time is rough. I'd make it directional. Holding fwd, holding down, neutral. That kinda thing.

----
Check if you have

[Command]
name = "s"
command = s
time = 1
and change "start" to "s" and it should work fine.
vVv Ryuko718 Updated 10/31/22 vVv
Re: How do I add multiple taunts as Random?
#5  July 19, 2022, 04:14:48 am
  • ***
  • "I'm Bal... I'm Veg...*Sigh* Just call me 'Claw'."
Check if you have

[Command]
name = "s"
command = s
time = 1
and change "start" to "s" and it should work fine.

Thank you!

I have checked all CNS files, but cant find any '[Command]'
"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE
Re: How do I add multiple taunts as Random?
#6  July 19, 2022, 04:32:49 am
  • *****
  • Shame on you!
    • USA
that's because they're all in the CMD file.
Download Fighter Factory 3 and test it out. It makes switching between the files pretty easy.
vVv Ryuko718 Updated 10/31/22 vVv
Re: How do I add multiple taunts as Random?
#7  July 23, 2022, 08:11:29 pm
  • ***
  • "I'm Bal... I'm Veg...*Sigh* Just call me 'Claw'."
that's because they're all in the CMD file.
Download Fighter Factory 3 and test it out. It makes switching between the files pretty easy.

Ok, I did so.
But it gives me this error:

"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE
Last Edit: July 24, 2022, 03:09:24 am by Tiger-Boy
Re: How do I add multiple taunts as Random?
#8  July 24, 2022, 04:17:30 am
  • **
Probably because you defined your command wrong, or don't even have the command block defined.
As the above posts said, for you, the command block should look like this in the .cmd (command) file:

[Command]
name = "start"
command = s
time = 1

you need to put this with all the other command blocks.  Don't put it under any of the negative statedefs.
Re: How do I add multiple taunts as Random?
#9  July 28, 2022, 08:25:32 pm
  • ***
  • "I'm Bal... I'm Veg...*Sigh* Just call me 'Claw'."
Probably because you defined your command wrong, or don't even have the command block defined.
As the above posts said, for you, the command block should look like this in the .cmd (command) file:

[Command]
name = "start"
command = s
time = 1

you need to put this with all the other command blocks.  Don't put it under any of the negative statedefs.

You mean this?



If so, then it gives me the error mentioned above when I change 'start' to 's'.
"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE
Re: How do I add multiple taunts as Random?
#10  July 29, 2022, 12:10:24 am
  • *****
  • Shame on you!
    • USA
If so, then it gives me the error mentioned above when I change 'start' to 's'.
So you can add in the 's' command or change anything that needs 's' as the command to 'Start'.
At this point I'm not sure what you're stuck on.
If you're still looking for the changestate in statedef -1 for state 195 or whichever, I find it helpful to use Ctrl+F and search for
195
then you'd keep searching until you find the changestate you need.
If the changestate doesn't exist at all, you'll need to make it.
You could probably copy and paste the changestate for state 200. Then you'd change 200 to 195 and you'd change 'x' to 'start' or 's'. Which ever one works easier for you.
vVv Ryuko718 Updated 10/31/22 vVv
Re: How do I add multiple taunts as Random?
#11  July 29, 2022, 03:15:52 am
  • ******
  • Take better care of the plants around u or become
  • the fertilizer that feeds them.The choice is yours
    • Chile
    • network.mugenguild.com/basara/
STOP STOP!! Don't confuse the boy, just make the multiple taunts in the CNS only!!

Tiger-Boy, leave the CMD commands just like the default state. These are the commands:
Code:
[Command] --> default command in the movelist
name = "start"
command = s
time = 1

;--------
[Statedef -1]
(...)
; Taunt
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "start" --> same name as in the command, or you'll get that error over and over
trigger1 = statetype != A
trigger1 = ctrl

Only focus on the CNS, if you want different taunts with the same button, make the state 195 as an empty one and put this:
Code:
; Taunts
[Statedef 195]
type = S
ctrl = 0
velset = 0,0

[State 180, VarRandom]
type = VarRandom
trigger1 = Time = 0
v = 11
range = 0,30

[State 180, Taunt 1]
type = ChangeState
trigger1 = Time = 1
trigger1 = var(11) = [0,10]
value = 196

[State 180, Taunt 2]
type = ChangeState
trigger1 = Time = 1
trigger1 = var(11) = [11,20]
value = 197

[State 180, Taunt 3]
type = ChangeState
trigger1 = Time = 1
trigger1 = var(11) = [21,30]
value = 198
Basically the 195 is where you put the random vars so the 3 others (rename them as 196, 197 and 198) can vary randomly. I use these codes for intros and wins, but also can work into taunts (in fact it's from one of my chars where I changed intros for taunts for this explanation). The var(x) can be any number (I use numbers like 10 or 11 for intros and wins) while don't clash with other vars you got in your character

Rest in peace, Toriyama-san...
Normal WIPS - ClayFighter - Ideas - Anti-Gouki Project - Lifebars - Facebook - X
Re: How do I add multiple taunts as Random?
#12  August 04, 2022, 09:16:01 pm
  • ***
  • "I'm Bal... I'm Veg...*Sigh* Just call me 'Claw'."
STOP STOP!! Don't confuse the boy, just make the multiple taunts in the CNS only!!

Tiger-Boy, leave the CMD commands just like the default state. These are the commands:

Only focus on the CNS, if you want different taunts with the same button, make the state 195 as an empty one and put this:

Basically the 195 is where you put the random vars so the 3 others (rename them as 196, 197 and 198) can vary randomly. I use these codes for intros and wins, but also can work into taunts (in fact it's from one of my chars where I changed intros for taunts for this explanation). The var(x) can be any number (I use numbers like 10 or 11 for intros and wins) while don't clash with other vars you got in your character

Thank you for your advice!

I tried this and it worked! Now the 'start' button will use 1 of 3 random animation.

The Command codes have been left as they were. Here is the updated code for the taunts on the CNS file:
Spoiler, click to toggle visibilty

Also, I had to use a "[State ###, End]: command after each animation command, or the animation will loop.

I thank you both Odb718 and Bad Mr. Basara for your time.

 :bjugoi:
"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE