Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Healing Factor  (Read 720 times)

Offline dolcry

  • ***
  • Posts: 113
  • Referrals: 0
Healing Factor
« on: October 08, 2009, 11:32:59 AM »
I need some help with programming. My request is simple... can you please help me figure out how to add/modify the healing factor of a character?

I like to modify my characters with updated AI, or different stats (greater strength, etc.) Superman should not be able to be beaten by BeastBoy, etc.

Where would I find the code that controls or creates the healing factor? Thanks!  ???
« Last Edit: October 08, 2009, 04:47:50 PM by Fredgerd »

Offline Red hood

  • ******
  • Posts: 2888
  • Referrals: 0
Re: Healing Factor
« Reply #1 on: October 08, 2009, 11:34:08 AM »
interesting question because some wolverine need one.  :thumbsup:

Offline dolcry

  • ***
  • Posts: 113
  • Referrals: 0
Re: Healing Factor
« Reply #2 on: October 08, 2009, 02:52:09 PM »
I noticed that the latest rendition of Wolverine (with the cool new moves and kicks), plus Guyver all have a healing factor. I think Dark Phoenix does as well. So how is it done?

Thanks!

Offline YD

  • ******
  • Posts: 3085
  • Country: 00
  • Referrals: 0
Re: Healing Factor
« Reply #3 on: October 08, 2009, 05:50:38 PM »
It depends on how you want it to heal. Are you trying to add health slowly as you play or do you want it to add a certain amount of health when your character reaches a set health value, meaning do you want the character to regain all their health or some if their health is below say 200? Like my Guyver for instance I placed a code that if his health gets lower than 100 he gains 900 health points back, so basically he gets his full health back if he is beaten below 100 health points. Is this what your trying to accomplish?

Offline dolcry

  • ***
  • Posts: 113
  • Referrals: 0
Re: Healing Factor
« Reply #4 on: October 08, 2009, 05:59:45 PM »
Yes. If that's how Guyver works, then that's what I want. It seems like he heals regularly though, if he goes a few seconds without being attacked.

BTW... Guyver is one of my favorite characters in MUGEN. Thank you!!!

Offline YD

  • ******
  • Posts: 3085
  • Country: 00
  • Referrals: 0
Re: Healing Factor
« Reply #5 on: October 08, 2009, 06:23:20 PM »
Ok to give a character a healing factor place this portion of code exactly as it is into the statedef -2 area of the .cns file


Code: [Select]
[State -2, Healing Factor]
type = lifeadd
trigger1 = random%3 = 0
value = 1


if you want to also add the health replenish code then add this portion of code to the Statedef -2 area of the .cns file also.


Code: [Select]
[State -2, Resurrection]
type = lifeadd
trigger1 = life <= 100
value = 900


Now the above code can be altered to you liking, The way it is now when the characters health goes below 100 it will add 900 which will basically bring it back to full health, so you can alter the numbers to  your liking, so if you want the health gain to kick in when the health reaches below 200 the nchange the portion that is 100 to 200 and the same for the amount of gain where it is now 900 you can make it higher or lower to suit your need. How this helps. :watchmen:

In case you don't know what the statedef -2 area is I'll show you:

EXAMPLE OF .CNS CODE FOR KFM:

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

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
 
In this area here is where you would paste the above code portions. This is typically found at the bottom of the .cns file.

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

;This controller plays a sound everytime KFM lands from a jump, or
;from his back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 40, 0


Offline dolcry

  • ***
  • Posts: 113
  • Referrals: 0
Re: Healing Factor
« Reply #6 on: October 08, 2009, 07:03:29 PM »
Thank you VERY much! I appreciate the time you took to give me this help!  :hellyeah:

Offline YD

  • ******
  • Posts: 3085
  • Country: 00
  • Referrals: 0
Re: Healing Factor
« Reply #7 on: October 08, 2009, 07:56:25 PM »
No pro blemo. :watchmen:

Offline Red hood

  • ******
  • Posts: 2888
  • Referrals: 0
Re: Healing Factor
« Reply #8 on: October 12, 2009, 12:58:18 PM »
wohoo so many things to add to my chars  W(- -)W