YesNoOk
avatar

Deathtanz Mantisk help: Boss music (Read 988 times)

Started by RedDragonCats17, November 19, 2018, 12:13:00 am
Share this topic:
Deathtanz Mantisk help: Boss music
#1  November 19, 2018, 12:13:00 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Originally, I did say that I needed help with jumping velocities. That's something I can work with on my own. As of now, Deathtanz is at a pretty good start. I replaced his walking state with jumping, as he is a boss and he never walks in his source game.

Right now I'm having a bit of trouble coding the boss music that plays when you fight him. I'm using the X8 boss fight music, since I like that better than any of the MMZ boss fight songs, and how I want it to function is kinda like Ahuron's MegaMan bosses. I separated the song into 2 parts: The beginning, and the main part. I want the beginning to play once, and the main part to loop once it ends.

Here's what the code looks like:

Code:
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 0, PlaySnd]
type = PlaySnd
trigger1 = roundstate = 2
value = S9000,0
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = roundstate = 2 && time > 2
value = S9000,1
loop = 1
lowpriority = 1
channel = 1

How do I make this work?
Last Edit: November 23, 2018, 03:34:17 am by RedDragonCats17
Re: Deathtanz Mantisk help: Boss music
#2  November 19, 2018, 10:09:31 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
such code has to go in the -2 states
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Deathtanz Mantisk help: Boss music
#3  November 19, 2018, 10:40:20 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Oh those are in the -2 states. I just didn't give them the numbers.

Edit: There, much better.
Code:
[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = teamside = 2
flag = nomusic

[State -2, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9000,0
channel = 1

[State -2, PlaySnd]
type = PlaySnd
trigger1 = time < 5
value = S9000,1
loop = 1
lowpriority = 1
channel = 2

[State -2, StopSnd]
type = StopSnd
trigger1 = roundstate = 3
channel = 2

Yes, I did modify the code a little bit. I was trying to make it work a little better, but the main part and the beginning play at the same time, which is bad.
Last Edit: November 19, 2018, 10:43:27 am by RedDragonCats17
Re: Deathtanz Mantisk help: Boss music
#4  November 20, 2018, 09:42:08 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
this is because you are using expressions such as time=0 and time<5 in a -2 state. This means, that everytime you go into a new state, these 2 triggers will repeat again.

If you only need them to trigger once, use a variable that is enabled the first time, and then prevents triggering twice. Or put the music code inside a helper and use persistent=0
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Deathtanz Mantisk help: Boss music
#5  November 21, 2018, 06:25:08 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Idk how I'm supposed to code the variable, but the helper spawns a clone. Could you give me a example on what the variable is supposed to look like, or perhaps find a way to stop the clones from showing up?
Re: Deathtanz Mantisk help: Boss music
#6  November 21, 2018, 10:49:33 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
VarSet, to set your variable
!NumHelper(XXXX), to prevent the clones from spawning more than 1
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Deathtanz Mantisk help: Boss music
#7  November 21, 2018, 09:27:39 pm
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Aight, I figured out the problem about the beginning and the main part playing at the same time. It turns out that the time I used is too small. Originally I used 2 and 5 ticks. Now I use 165 ticks.

The only issue now is the clone. I used !NumHelper(9999), and a clone still spawned. How do I prevent clones from spawning at all?
Re: Deathtanz Mantisk help: Boss music
#8  November 21, 2018, 09:51:28 pm
  • ****
    • USA
    • twitter.com/inktrebuchet

  • Online
Make sure an ID is included.

[state n]
type = helper
trigger1 = !NumHelper(9999)
id = 9999
Re: Deathtanz Mantisk help: Boss music
#9  November 21, 2018, 10:25:53 pm
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
An ID is included.

Code:
[State 0, Helper]
type = Helper
triggerall = !numhelper(9999)
trigger1 = roundstate = 2
helpertype = normal ;player
name = "music"
ID = 9999
stateno = 9999

Here's the helper itself. Does it need any adjustments in the statedef or something?

Code:
[Statedef 9999]
movetype = I

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S9000,0
channel = 1
persistent = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time > 165
value = S9000,1
loop = 1
channel = 2
persistent = 0

[State 0, StopSnd]
type = StopSnd
trigger1 = roundstate = 3
channel = 2
Re: Deathtanz Mantisk help: Boss music
#10  November 22, 2018, 08:33:26 am
  • *****
  • Shame on you!
    • USA
Make that helper an actual thing. Add an animation and everything that it needs.
Also, you may want to look into GameTime.
Use debug. I'm sure you're getting debug flood.

If you want it to loop, figure out how many tics the sound is. 60 tics is a second, but seconds are broken down into tenths, or 100ths, or 1000ths, So you'll be doing some rounding I'd imagine.
Then you could spawn a var to keep track of game time when the helper is spawned and do
time%the amount of tics the sound is=0
as a trigger.

Read up on the helper in general. There's a lot of tricky crap that can happen with them.

One thing that could mess with you is intros. You wont be able to control how long every character you face's intro is. So that's completely random, AND people will skip the intro, so that also messes up time and gametime estimations. Unless you're making a full game*

Something like
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time > 165  <<<<This,
is going to give you a repeating sound every single tic. Remember to LOCK down your triggers and then open them up. This is wide open after the clock hits 165. You wont like what you hear. Maybe this is why you think the helper is duplicated? Did you cycle through with CTRL+D to see that you had multiple helpers???
vVv Ryuko718 Updated 10/31/22 vVv
Re: Deathtanz Mantisk help: Boss music
#11  November 23, 2018, 03:32:13 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
The clone issue is fixed. Thanks, Odb, for the animation suggestion. I made a bind anim for the music itself, and the clones stopped spawning

The music itself works fine. The sound isn't being duplicated, so it's all good. But thanks for the gametime suggestion.

Thread is solved. This was much more simple than the other threads, huh?

I am planning on making another thread revolving Deathtanz, and a request thread on a application for video game character animations, as my goal for the playable characters' animations is to replicate the animations tic by tic, and make sure that they are completely aligned.
Last Edit: November 23, 2018, 04:45:13 am by RedDragonCats17