collapse

Author Topic: Something cool I made you can add to your characters's coding..  (Read 735 times)

0 Members and 1 Guest are viewing this topic.

Offline Saohc

  • Initiate
  • **
  • Posts: 65
  • Country: United States us
  • Last Login:August 23, 2014, 11:51:42 AM
    • Email
I made this coding while messing around with MUGEN some..

Are you pretty much tired of the old Marvel vs Capcom crap of a simple sound effect and a explod that says "DANGER"?(no offense.)
Here's a different type of way you can notify the player, that the character's health is low.
This type of "Danger State" is similar to the ones seen in inFamous and Uncharted.

I do have this implemented, in my character, LucasX3(Dark).
This will involve use variables and such.

Now on with the tutorial.

First you will need to look through your character's .cns(if you are using KFM to make a character..) and find this:

Quote
;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[statedef -2]

Now you will have to add this to below "[statedef -2]"

Quote
;Danger! (When Energy Gets Low)
;SetDanger Variable
[State -2, VarSet]
type = VarSet
triggerall = life < 205
trigger1 = (var(46) = 0)
v = 46
value = 1
You can change the variable number to whatever you want, but if you are using KFM, keep it as it is.

Now for the sound that will play, add this below:
Quote
;Danger!
[State -2, PlaySnd]
type = PlaySnd
trigger1 = var(46) = 1
value = 9067,0
volume = 255
flag = nomusic ;I don't know why this is here, but okay
You can change the "value" numbers to anything you have in your character's .snd file that would be fit for this type of state that character goes into.

Go head and add this below:
Quote
;Close Danger Var
[State -2, VarSet]
type = VarSet
trigger1 = var(46) = 1
v = 46
value = 2]

This is up next and this will kill the music for dramatic effect:
Quote
;Begin NoMusic state.
[State -2, VarSet]
type = VarSet
trigger1 = var(46) = 2
v = 58    ;fv = 10
value = 1
ignorehitpause = 1



[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = var(58) = 1
flag = nomusic

This is all the extra stuff that will change the background and characters to Black and White:
Quote
[State -2, AllPalFX]
type = BGPalFX
trigger1 = var(55) = 1
time = -1
add = 50,50,50
ignorehitpause = 1
color = 0
persistent = 0

[State -2, VarSet]
type = VarSet
trigger1 = var(55) = 1
v = 56    ;fv = 10
value = 1


[State -2, AllPalFX]
type = AllPalFX
trigger1 = var(56) = 1
time = -1
add = 50,50,50
ignorehitpause = 1
color = 0
persistent = 0

[State -2, VarSet]
type = VarSet
trigger1 = life < 200
v = 55   ;fv = 10
value = 1
ignorehitpause = 1

[State -2, PalFX critical2]
type = PalFX
trigger1= var(55) = 1
time = -1
ignorehitpause = 1
add = 128,128,128

Now this is the next step, now we are trying to prevent the other player or the opponent from escaping the "PalFX or Pallete Effects":
Quote
;-------------------------
;P2 Danger State
;Since the other player can get out of the "black and white" palfx
;This has been added.

[State -2, Prevent the opponent from getting out of the PALFX]
type = TargetState
trigger1 = !time
value = 3551
ID = 3500

Now you will have to add this and this shouldn't be in [State -2], or else it won't work or it will cause some problems, if you have a lot of other stuff in [State -2].

Now find this:

Quote
;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

and above it add:

Quote
;----------------
;PALFX STATE
;This is just for something related to state -2
[Statedef 3551]
type    = S
movetype= H
physics = N
velset = -3,-4
ctrl = 0

[State 3351, PalFX]
type = PalFX
trigger1 = 1
time = -1
persistent = 1
color = 0

[State 3551]
type = selfstate
trigger1 = alive = 0
value = 5150

Now you are finished! You have added something good to your character and something a bit unique.

The only real bug with this code, is because of the NoMusic state, in WinMUGEN, the music may skip in the next round.

I would like to thank Elecbyte for those documents on MUGEN :)



Offline Acey

  • Infinity Administrator
  • *
  • Posts: 9579
  • Country: United States us
  • Last Login:December 05, 2022, 10:43:15 PM
  • "Victory means nothing, the fight is everything."
    • Infinity Wiki - Acey
    • Email
Re: Something cool I made you can add to your characters's coding..
« Reply #1 on: July 19, 2010, 12:03:46 PM »
So what does this code do exactly?

Offline Saohc

  • Initiate
  • **
  • Posts: 65
  • Country: United States us
  • Last Login:August 23, 2014, 11:51:42 AM
    • Email
Re: Something cool I made you can add to your characters's coding..
« Reply #2 on: July 22, 2010, 04:37:11 PM »
Quote
This type of "Danger State" is similar to the ones seen in inFamous and Uncharted.

It turns the screen to black and white and the characters too.
In my character, a heartbeat sound plays..

The problem with the coding is, the PalFX can be overrided, so any suggestions would help fix up the code..

Offline SanjiSasuke

  • Wannabe Disciple of Master Lee
  • Infinity Faithful
  • ****
  • Posts: 2963
  • Last Login:July 04, 2018, 10:39:08 PM
  • Vega: Master of the Claw (along with Wolverine)
    • SanjiSasuke's Lair
    • Email
Re: Something cool I made you can add to your characters's coding..
« Reply #3 on: August 05, 2010, 02:15:02 PM »
I wish I could think of some more games that use this, that actually have characters, it would work well like that.

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Something cool I made you can add to your characters's coding..
« Reply #4 on: August 05, 2010, 02:59:42 PM »
It's a cool little thing you did for fun.

I'd say the music skipping the next round is a pretty big issue though.

Offline Saohc

  • Initiate
  • **
  • Posts: 65
  • Country: United States us
  • Last Login:August 23, 2014, 11:51:42 AM
    • Email
Re: Something cool I made you can add to your characters's coding..
« Reply #5 on: August 08, 2010, 10:58:19 AM »
It's a cool little thing you did for fun.

I'd say the music skipping the next round is a pretty big issue though.

I forgot to mention the fact that the PalFX can be overrided.

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

D2TD VS Showcase Thread by D2TD
[November 24, 2024, 09:12:03 AM]


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]


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