The Mugen Multiverse
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Welcome!!! - Bienvenidos!!! - ( We hope you will get involved in the MMV Community which is dedicated to having fun with Mugen ) - Bienvenidos!!! - Welcome!!!
 
PortalHomeFAQMemberlistLatest imagesUsergroupsSearchRegisterComic WIP TrackerDownloadsLog inChat
Website Navigation Help
Translate the Website
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» Wizard project
A basic "The less health, the more knockback" code? Emptyby RenatoNat.J Today at 9:05 pm

» Sabbac DC Mugen Char WIP ⛧
A basic "The less health, the more knockback" code? Emptyby RenatoNat.J Today at 8:24 pm

» Anyone have a large MvC / DC character pack / full game to download?
A basic "The less health, the more knockback" code? Emptyby Navana Today at 8:08 pm

» Zatara The Master Magician WIP by RenatoNato
A basic "The less health, the more knockback" code? Emptyby RenatoNat.J Today at 5:23 pm

Special Features at MMV




Chat on MMV w/ Discord

Video Content Creation Reference
Search
 
 

Display results as :
 
Rechercher Advanced Search

 

 A basic "The less health, the more knockback" code?

Go down 
3 posters
AuthorMessage
Mega_Man

Mega_Man


Posts : 148
Join date : 2016-01-23

A basic "The less health, the more knockback" code? Empty
PostSubject: A basic "The less health, the more knockback" code?   A basic "The less health, the more knockback" code? EmptyDecember 9th 2016, 8:35 pm

I am pretty sure this is possible. If so, any ideas to make this? I have already accomplished the opposite with a simple P2Life but changing the - and / to a + and * is not enough.
Back to top Go down
Mistah Jorge

Mistah Jorge


Posts : 2356
Join date : 2013-07-04
Age : 26
Location : Portugal

A basic "The less health, the more knockback" code? Empty
PostSubject: Re: A basic "The less health, the more knockback" code?   A basic "The less health, the more knockback" code? EmptyDecember 12th 2016, 3:09 am

hum... try this:
("your knockback value" * (1 + (1 - (LifeMax/1000)))) 04 Try this idea by borewood instead 04 ("your knockback value" * (1 + (1 - (Life/LifeMax))))


Last edited by Mistah Jorge on December 12th 2016, 11:03 am; edited 3 times in total
Back to top Go down
Werewood

Werewood


Posts : 5691
Join date : 2014-08-11

A basic "The less health, the more knockback" code? Empty
PostSubject: Re: A basic "The less health, the more knockback" code?   A basic "The less health, the more knockback" code? EmptyDecember 12th 2016, 7:06 am

@Mistah Jorge:
might be try "Life/LifeMax" because some MUGEN characters have Life value more than 1000? Wink

And wait, which MUGEN case did you mean Mega_Man? Question
1) P1's Life down => P1 gets knocked back more
2) P1's Life down => P2 gets knocked back more
3) P2's Life down => P2 gets knocked back more
4) P2's Life down => P1 gets knocked back more
I am asking because for each different MUGEN case the MUGEN code shall be different too... A basic "The less health, the more knockback" code? 3876111886
Back to top Go down
https://onedrive.live.com/?cid=7DB65F02B0BBD12E
Mistah Jorge

Mistah Jorge


Posts : 2356
Join date : 2013-07-04
Age : 26
Location : Portugal

A basic "The less health, the more knockback" code? Empty
PostSubject: Re: A basic "The less health, the more knockback" code?   A basic "The less health, the more knockback" code? EmptyDecember 12th 2016, 8:03 am

Yes i tried it, and thanks for correcting me, your way is better
Back to top Go down
Mega_Man

Mega_Man


Posts : 148
Join date : 2016-01-23

A basic "The less health, the more knockback" code? Empty
PostSubject: Re: A basic "The less health, the more knockback" code?   A basic "The less health, the more knockback" code? EmptyDecember 13th 2016, 5:53 pm

borewood2013 wrote:
@Mistah Jorge:
might be try "Life/LifeMax" because some MUGEN characters have Life value more than 1000? Wink

And wait, which MUGEN case did you mean Mega_Man? Question
1) P1's Life down => P1 gets knocked back more
2) P1's Life down => P2 gets knocked back more
3) P2's Life down => P2 gets knocked back more
4) P2's Life down => P1 gets knocked back more
I am asking because for each different MUGEN case the MUGEN code shall be different too... A basic "The less health, the more knockback" code? 3876111886
Number 4...

The one that Jorge provided seemed to of had the same knockback no matter the health P2 has. Maybe it's just not noticable?

Back to top Go down
Werewood

Werewood


Posts : 5691
Join date : 2014-08-11

A basic "The less health, the more knockback" code? Empty
PostSubject: Re: A basic "The less health, the more knockback" code?   A basic "The less health, the more knockback" code? EmptyDecember 16th 2016, 1:15 pm

>> Number 4...
So, your MUGEN case is:  "4) P2's Life down => P1 gets knocked back more"  A basic "The less health, the more knockback" code? 3876111886

Perhaps you might want to try this  geek:

A) Under your [Statedef -2], use a MUGEN float variable to keep recording your MUGEN Enemy's Life:
[State -2, VarSet]  ;;; make sure your FVar(39) MUGEN float variable is not in use...
type = VarSet
triggerall = NumEnemy
triggerall = EnemyNear, Alive = 1 && EnemyNear, Life != 0
trigger1 = 1
fv = 39
value = EnemyNear, Life
ignorehitpause = 1
persistent = 1

B) Under your [Statedef -3], use a VelMul MUGEN State Controller to make your x-velocity multiple by the FVar(39) MUGEN float variable, and your MUGEN Character's State Time:
[State -3, VelMul] ;P2's Life down => P1 gets knocked back more (on ground only & not in P2's custom states)
type = VelMul
triggerall = NumEnemy
triggerall = StateType != A
triggerall = StateType != L
triggerall = MoveType = H
triggerall = Alive = 1 && Life != 0
triggerall = EnemyNear, Alive = 1 && EnemyNear, Life != 0
triggerall = EnemyNear, Life < EnemyNear, LifeMax
trigger1 = GetHitVar(xvel) != 0.0
trigger1 = GetHitVar(hitshaketime) = 0
trigger1 = Time = [1, 2]  ; [1, #] => the bigger # is, the longer time VelMul is in effect....
x = 1.0 + ((EnemyNear, LifeMax - FVar(39)) / EnemyNear, LifeMax)
y = 0.0
ignorehitpause = 0
persistent = 1

-------------------------------------------------

P.S. OK I tried to use just the "1.0 + ((EnemyNear, LifeMax - EnemyNear, Life) / EnemyNear, LifeMax)" for the VelMul x = value, but somehow it didn't work.........and it can work only by using a MUGEN float variable (FVar(39), which I chose it as it is the biggest MUGEN float variable you can have) to record your MUGEN Enemy's Life........don't know why........ scratch
Back to top Go down
https://onedrive.live.com/?cid=7DB65F02B0BBD12E
Sponsored content





A basic "The less health, the more knockback" code? Empty
PostSubject: Re: A basic "The less health, the more knockback" code?   A basic "The less health, the more knockback" code? Empty

Back to top Go down
 
A basic "The less health, the more knockback" code?
Back to top 
Page 1 of 1
 Similar topics
-
» What basic mugen character sprite?
» V's health trouble + event hiccup
» WHAT IS THE PURPOSE OF add004 basic ?
» baraka basic model
» BSB Samus (3 specials done and all basic stuff)

Permissions in this forum:You cannot reply to topics in this forum
The Mugen Multiverse :: Mugen Related :: Mugen Help-
Jump to: