collapse

Author Topic: Something cool I made you can add to your characters's coding..  (Read 624 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
[May 12, 2024, 10:20:11 AM]


Classic VS : Athena by ELECTRO
[May 10, 2024, 02:44:09 PM]


Ballroom Hallway (1.1 Only/AIGS) by Vegaz by LightFlare
[May 09, 2024, 11:53:48 AM]


Neon Light Force Demo by kyoman
[May 08, 2024, 12:50:05 PM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[April 21, 2024, 12:09:20 PM]


Ultimate E. Honda + stage by ELECTRO
[April 18, 2024, 09:47:24 PM]


Sunset Beach (1.1 Only/AIGS) by Vegaz by LightFlare
[April 16, 2024, 06:55:00 PM]


Wonder Twins 2.0 by brucewayne74, Shining and Skhsato123 by brucewayne74
[April 05, 2024, 06:07:48 PM]


X-Men Training Room (Bright & Dark) Stage 1.1 & 1.0 by MatreroG
[April 05, 2024, 10:55:29 AM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[April 01, 2024, 11:03:03 PM]

* IMT Calendar

May 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 31

SimplePortal 2.3.5 © 2008-2012, SimplePortal