collapse

Author Topic: Custom bgm when players life is low, Final Round! (New)  (Read 3608 times)

0 Members and 12 Guests are viewing this topic.

Offline ClubSyN-X-TReME

  • Character and Interactive Stage Specialist
  • Club Syndicate Admin
  • *
  • Posts: 1641
  • Last Login:July 28, 2014, 06:54:54 AM
    • Club SyN -X-treme
Custom bgm when players life is low, Final Round! (New)
« on: August 12, 2007, 09:49:21 AM »
[youtube=425,350]qC5JmKaCh58[/youtube]

Ever wanted a code to make the music change when either player is about to die when their life is low after losing a round?

Thats the purpose of the video about and the codes I am about to share with you. This is based on games like killer instinct 2, street fighter 2 and a few more games i can think of.

First we need a helper and two free variables coded in statedef -2 or -3, your choice.

Code: [Select]

[State -2, VarSet]
type = VarSet
trigger1 = loseko
v = x
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = winko
v = y
value = 1

[State -2, Helper]
type = Helper
trigger1 = 1 && !numhelper(xxxxx)
helpertype = normal
name = "near Death bgm"
stateno = xxxxx
id = xxxxx
pos = 0,9999999
postype = left ;p2,front,back,left,right
facing = 1
pausemovetime = 99999999999
supermovetime = 99999999999

The first two varset codes activates when you lose or win a round. This is needed for how things are coded in the helper states. The helper above is always active from the start of the match.

Now for the helper states.

Code: [Select]
;-----------------------------------------------------------------------
;About to Die after loss of a round bgm helper
;-----------------------------------------------------------------------
[Statedef xxxxx]
type = S
movetype = I
physics = n

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow

[State 0, AssertSpecial]
type = AssertSpecial
triggerall = (roundno >= 2 && (root,var(x) = 1 && root,life <= lifemax /3) || (root,var(y) = 1 && enemy,life <= lifemax /3))
trigger1 = 1
flag = nomusic

[State 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 0]
type = PlayerPush
trigger1 = 1
value = 1

[State 0, PlaySnd]; player 1 side
type = PlaySnd
triggerall = roundno >= 2 && root,var(x) = 1 && root,life != 0
trigger1 = root,life <= lifemax /3
value = Sx,x
volume = 100
channel = 6
loop = 1
persistent = 0

[State 0, PlaySnd]:player 2 side
type = PlaySnd
triggerall = roundno >= 2 && root,var(y) = 1 && enemy,life != 0
trigger1 = enemy,life <= lifemax /3
value = Sx,x
volume = 100
channel = 6
loop = 1
persistent = 0

[State 0, StopSnd]
type = StopSnd
triggerall = roundno >= 2
trigger1 = root,stateno = 5999
channel = 6
persistent = 0


This will activate when player one has lost a round and has a third of life left. It will also work when player two has lost a round and has a third of life left.


For extra effects like a danger logo or whatever, add an explod.

To prevent this for being used in simulation mode with can cause some weird effects. add this line to the helper.

For Team mode,

Code: [Select]
trigger1 = teammode = single || teammode = turns
trigger1 = enemy, teammode = single || enemy, teammode = turns

Add those triggers to the helper code.
« Last Edit: August 13, 2007, 08:30:35 AM by H€®mî† -=†H€ §î׆H fî$†=- »



Offline .:K.I.N.G:.

  • King &
  • Global Moderator
  • *
  • Posts: 1867
  • Last Login:May 16, 2013, 07:18:26 PM
  • Accepting All Challenges
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #1 on: August 12, 2007, 01:00:09 PM »
here is my answer from the past thread. ::)
1- i want to use deferent music or each round..lets say round 1 has it's own track, round 2 has it's own...etc
2- i want to use the music for characters not stages..lets say i use ryo he comes with his track, i use robert in the same stage he also comes with his own track...and on
3-i want to use random tracks for a stage not just one. ;D
is any of this possible?

waiting ::)
I'm a Dude Playing a Dude, Disguised as Another Dude

Offline Nutty-Da-Kid

  • Infinite Loyalist
  • *****
  • Posts: 2716
  • Last Login:November 08, 2013, 06:04:06 PM
  • Still Nutpatch but a bit more nutty
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #2 on: August 13, 2007, 12:05:02 AM »
i want to learn this but its really confusing ???

Offline Nutty-Da-Kid

  • Infinite Loyalist
  • *****
  • Posts: 2716
  • Last Login:November 08, 2013, 06:04:06 PM
  • Still Nutpatch but a bit more nutty
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #3 on: August 13, 2007, 12:10:37 AM »
besides wat if there is only one round then will it work

Offline shootYr.

  • [Magnum]
  • Contributor
  • ****
  • Posts: 1112
  • Last Login:September 11, 2012, 07:27:16 PM
  • What're you gonna do to me?...
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #4 on: August 18, 2007, 01:33:01 AM »
besides wat if there is only one round?

XD

You could just alter it to say one round.

Offline ClubSyN-X-TReME

  • Character and Interactive Stage Specialist
  • Club Syndicate Admin
  • *
  • Posts: 1641
  • Last Login:July 28, 2014, 06:54:54 AM
    • Club SyN -X-treme
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #5 on: August 19, 2007, 08:45:11 AM »
here is my answer from the past thread. ::)
1- i want to use deferent music or each round..lets say round 1 has it's own track, round 2 has it's own...etc
2- i want to use the music for characters not stages..lets say i use ryo he comes with his track, i use robert in the same stage he also comes with his own track...and on
3-i want to use random tracks for a stage not just one. ;D
is any of this possible?

waiting ::)

this has nothing to do with what this topic is about, But its possible, I will explain how in a different thread.

-edit-

http://www.infinitymugenteam.com/Forum_345/index.php?topic=1064.0

besides wat if there is only one round then will it work

replace roundno >= 2 with roundno = 1
« Last Edit: August 19, 2007, 09:11:54 AM by H€®mî† -=†H€ §î׆H fî$†=- »

Offline Nutty-Da-Kid

  • Infinite Loyalist
  • *****
  • Posts: 2716
  • Last Login:November 08, 2013, 06:04:06 PM
  • Still Nutpatch but a bit more nutty
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #6 on: August 22, 2007, 10:19:04 AM »
this is wat loses me so the code do i actually have to write that in the character def file and also where do i write it

Offline Nutty-Da-Kid

  • Infinite Loyalist
  • *****
  • Posts: 2716
  • Last Login:November 08, 2013, 06:04:06 PM
  • Still Nutpatch but a bit more nutty
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #7 on: August 22, 2007, 10:20:30 AM »
oh yea and plus i usually play team arcade so that wont work for team arcade will it

Offline ClubSyN-X-TReME

  • Character and Interactive Stage Specialist
  • Club Syndicate Admin
  • *
  • Posts: 1641
  • Last Login:July 28, 2014, 06:54:54 AM
    • Club SyN -X-treme
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #8 on: August 22, 2007, 11:25:56 AM »
Re Read my first post towards the bottom, i already explained it.

Offline Spidermew

  • IMT Content Architect
  • *
  • Posts: 6059
  • Country: United States us
  • Last Login:January 16, 2024, 10:15:50 PM
  • Wubba lubba dub-dub
    • Skype - spidermew@aol.com
    • SpiderMew's House of Stuff
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #9 on: August 22, 2007, 12:31:01 PM »
Do you put the near death bgm in the character's folder or the sound folder?

And if it automaticly takes from the sound folder can you make it take it out of the character folder?

When i get to the point were im going to start figuring out coding to make Sniper Joe i want to enclude this feature.

Offline ClubSyN-X-TReME

  • Character and Interactive Stage Specialist
  • Club Syndicate Admin
  • *
  • Posts: 1641
  • Last Login:July 28, 2014, 06:54:54 AM
    • Club SyN -X-treme
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #10 on: August 22, 2007, 02:23:13 PM »
Do you put the near death bgm in the character's folder or the sound folder?

And if it automaticly takes from the sound folder can you make it take it out of the character folder?

When i get to the point were im going to start figuring out coding to make Sniper Joe i want to enclude this feature.

its part of the characters sound file.

I was doing this guide for those that were making their own character btw.

Offline That Mugen Guy

  • Infinity Faithful
  • ****
  • Posts: 2805
  • Last Login:March 27, 2012, 11:40:02 PM
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #11 on: August 27, 2007, 06:22:01 PM »
edit: found your next thread
« Last Edit: August 27, 2007, 06:26:17 PM by That Mugen Guy »


Jesus loves me, he loves me a bunch! Because he always puts Skippy in my lunch!

Offline Mugen_Fire

  • Initiate
  • **
  • Posts: 39
  • Last Login:February 03, 2009, 09:37:45 PM
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #12 on: September 02, 2007, 11:11:19 PM »
how you do this if you only DL your chars like I want it for spiderman BUT IT WON"T WORK how you do this


Offline Nutty-Da-Kid

  • Infinite Loyalist
  • *****
  • Posts: 2716
  • Last Login:November 08, 2013, 06:04:06 PM
  • Still Nutpatch but a bit more nutty
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #13 on: September 02, 2007, 11:31:54 PM »
how you do this if you only DL your chars like I want it for spiderman BUT IT WON"T WORK how you do this

i know all this is confusin as hell and not specific enough they dont even tell u where to put that giant code thing out ~X(

Offline Violent Ken Masters

  • Contributor
  • ****
  • Posts: 4379
  • Last Login:April 17, 2017, 01:52:10 AM
  • WELCOME TO DIE!!!
    • Violent Ken's site
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #14 on: September 03, 2007, 12:56:55 AM »
[youtube=425,350]qC5JmKaCh58[/youtube]
That voice is creepy as hell.

Offline Spidermew

  • IMT Content Architect
  • *
  • Posts: 6059
  • Country: United States us
  • Last Login:January 16, 2024, 10:15:50 PM
  • Wubba lubba dub-dub
    • Skype - spidermew@aol.com
    • SpiderMew's House of Stuff
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #15 on: September 17, 2007, 08:25:15 PM »
Question...

If i remove
Code: [Select]
trigger1 = root,life <= lifemax /3
from the helper code, will it just start on round 2 with max life?

Offline ClubSyN-X-TReME

  • Character and Interactive Stage Specialist
  • Club Syndicate Admin
  • *
  • Posts: 1641
  • Last Login:July 28, 2014, 06:54:54 AM
    • Club SyN -X-treme
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #16 on: September 29, 2007, 02:24:38 AM »
how you do this if you only DL your chars like I want it for spiderman BUT IT WON"T WORK how you do this

i know all this is confusin as hell and not specific enough they dont even tell u where to put that giant code thing out ~X(

I clearly said this earlier,


I was doing this guide for those that were making their own character btw.

And if you knew how to code characters, the State prefixes would tell you how to place the codes.i didn't say anything about editing existing characters. I make these guides for others to learn, not to copy and paste to already made characters despite how they were developed.

Question...

If i remove
Code: [Select]
trigger1 = root,life <= lifemax /3
from the helper code, will it just start on round 2 with max life?

Yes.
« Last Edit: September 29, 2007, 02:27:32 AM by H€®mî† -=†H€ §î׆H fî$†=- »

Offline shootYr.

  • [Magnum]
  • Contributor
  • ****
  • Posts: 1112
  • Last Login:September 11, 2012, 07:27:16 PM
  • What're you gonna do to me?...
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #17 on: September 29, 2007, 02:26:26 AM »
Uhh, huh...
And what happens when both players have the same exact near deth code?

Offline ClubSyN-X-TReME

  • Character and Interactive Stage Specialist
  • Club Syndicate Admin
  • *
  • Posts: 1641
  • Last Login:July 28, 2014, 06:54:54 AM
    • Club SyN -X-treme
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #18 on: September 29, 2007, 02:28:44 AM »
the video from the begining should of told you that answer.

Offline shootYr.

  • [Magnum]
  • Contributor
  • ****
  • Posts: 1112
  • Last Login:September 11, 2012, 07:27:16 PM
  • What're you gonna do to me?...
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #19 on: September 29, 2007, 02:33:20 AM »
the video from the begining should of told you that answer.

Whats that?!
~SYN~ is tryin' to play me?! XD
Lets see...... Im still mystified.
« Last Edit: September 29, 2007, 02:35:22 AM by Ghost »

Offline Spidermew

  • IMT Content Architect
  • *
  • Posts: 6059
  • Country: United States us
  • Last Login:January 16, 2024, 10:15:50 PM
  • Wubba lubba dub-dub
    • Skype - spidermew@aol.com
    • SpiderMew's House of Stuff
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #20 on: November 06, 2007, 08:48:19 PM »
Ok im trying to get this to work for the character im making, but im doing something wrong.

I put the statedef -2 stuff in the area with the rest of the -2 stuff... figured that was a no brainer.

Now i wasnt sure were to put the helper code so i just put it up with my regluar attacks and stuff and renamed the xxxxxx to 8001 (out of random just about but i dont have any other states with that number)

all the xxxxx in the -2 you posted i changed to 8001

Uploaded my song, put group 8001, 1
were i saw Sx,x i put 8001, 1

Now whenever i hit run in winmugen from fighter factory it crashes mugen, i cant make a screen shot of the error message because vista keeps closing it and sends an error report.
I did notice the first time was someting like
invalid value x


IM sorry if im being n00bish and not realizing it. I dont know allot about code and im learning as a i go along. If you could perhaps point out were im making my mistakes i would appreceate it.

Offline duffstuff129

  • Initiate
  • **
  • Posts: 33
  • Last Login:November 02, 2008, 07:01:06 PM
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #21 on: November 07, 2007, 07:01:08 PM »
Thanks a ton! By the way, nice lifebars, any chance you could send em my way?
If everyone in the world was as cool as me, there would be way too many nerds.

Offline Spidermew

  • IMT Content Architect
  • *
  • Posts: 6059
  • Country: United States us
  • Last Login:January 16, 2024, 10:15:50 PM
  • Wubba lubba dub-dub
    • Skype - spidermew@aol.com
    • SpiderMew's House of Stuff
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #22 on: November 07, 2007, 07:03:16 PM »
Thanks a ton! By the way, nice lifebars, any chance you could send em my way?

Read the  :rulez:
Thats not how you ask for stuf.

Offline ClubSyN-X-TReME

  • Character and Interactive Stage Specialist
  • Club Syndicate Admin
  • *
  • Posts: 1641
  • Last Login:July 28, 2014, 06:54:54 AM
    • Club SyN -X-treme
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #23 on: November 08, 2007, 06:33:10 AM »
Ok im trying to get this to work for the character im making, but im doing something wrong.

I put the statedef -2 stuff in the area with the rest of the -2 stuff... figured that was a no brainer.

Now i wasnt sure were to put the helper code so i just put it up with my regluar attacks and stuff and renamed the xxxxxx to 8001 (out of random just about but i dont have any other states with that number)

all the xxxxx in the -2 you posted i changed to 8001

Uploaded my song, put group 8001, 1
were i saw Sx,x i put 8001, 1

Now whenever i hit run in winmugen from fighter factory it crashes mugen, i cant make a screen shot of the error message because vista keeps closing it and sends an error report.
I did notice the first time was someting like
invalid value x


IM sorry if im being n00bish and not realizing it. I dont know allot about code and im learning as a i go along. If you could perhaps point out were im making my mistakes i would appreceate it.

post your coding so I can see.

Offline Spidermew

  • IMT Content Architect
  • *
  • Posts: 6059
  • Country: United States us
  • Last Login:January 16, 2024, 10:15:50 PM
  • Wubba lubba dub-dub
    • Skype - spidermew@aol.com
    • SpiderMew's House of Stuff
    • Email
Re: Custom bgm when players life is low, Final Round! (New)
« Reply #24 on: November 08, 2007, 12:08:16 PM »
Code: [Select]
;-----------------------------------------------------------------------
;About to Die after loss of a round bgm helper
;-----------------------------------------------------------------------
[Statedef 8001]
type = S
movetype = I
physics = n

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow

[State 0, AssertSpecial]
type = AssertSpecial
triggerall = (roundno >= 2 && (root,var(x) = 1 && root,life <= lifemax /3) || (root,var(y) = 1 && enemy,life <= lifemax /3))
trigger1 = 1
flag = nomusic

[State 0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 0]
type = PlayerPush
trigger1 = 1
value = 1

[State 0, PlaySnd]; player 1 side
type = PlaySnd
triggerall = roundno >= 2 && root,var(x) = 1 && root,life != 0
trigger1 = root,life <= lifemax /3
value = 8001, 1
volume = 100
channel = 6
loop = 1
persistent = 0

[State 0, PlaySnd]:player 2 side
type = PlaySnd
triggerall = roundno >= 2 && root,var(y) = 1 && enemy,life != 0
trigger1 = enemy,life <= lifemax /3
value = 8001, 1
volume = 100
channel = 6
loop = 1
persistent = 0

[State 0, StopSnd]
type = StopSnd
triggerall = roundno >= 2
trigger1 = root,stateno = 5999
channel = 6
persistent = 0



;-----------------------Round 2 Music------------------

[State -2, VarSet]
type = VarSet
trigger1 = loseko
v = x
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = winko
v = y
value = 1

[State -2, Helper]
type = Helper
trigger1 = 1 && !numhelper(8001)
helpertype = normal
name = "near Death bgm"
stateno = 8001
id = 8001
pos = 0,9999999
postype = left ;p2,front,back,left,right
facing = 1
pausemovetime = 99999999999
supermovetime = 99999999999

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by LightFlare
[November 21, 2024, 09:44:09 PM]


Terrordrome: Rise of the Boogeymen Extended Version ( jeepers creepers) version by leonardo
[November 19, 2024, 10:22:47 PM]


Hill of the Nameless(1.1 Only) by Vegaz by LightFlare
[November 19, 2024, 10:50:39 AM]


Golden Axe Returns by gokudo99
[November 19, 2024, 03:59:31 AM]


D2TD VS Showcase Thread by D2TD
[November 17, 2024, 08:36:39 AM]


Barkley Shut Up and Jam! Stages by Vegaz by LightFlare
[November 12, 2024, 11:26:21 AM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[November 11, 2024, 12:35:24 PM]


Eternal Lament Stage 1.1 & 1.0 by O Ilusionista
[November 11, 2024, 12:34:54 PM]


MatreroG's Stages W.I.P. Concepts by MatreroG
[November 11, 2024, 07:00:56 AM]


Spooky House(1.1 Only/AIGS) by Vegaz by LightFlare
[October 31, 2024, 11:31:36 AM]

* IMT Calendar

November 2024
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 [23]
24 25 26 27 28 29 30

SimplePortal 2.3.5 © 2008-2012, SimplePortal