YesNoOk
avatar

life = 0 and not KO'd using helper? (Read 226 times)

Started by Disconcorde, November 02, 2019, 02:53:37 pm
Share this topic:
life = 0 and not KO'd using helper?
#1  November 02, 2019, 02:53:37 pm
  • avatar
  • *
    • UK
If the question isn't clear from the title, it's because I did not know how to make a clear title for what I'm about to ask. I know that if you use a NoKo flag in -2, it will hold your life at 0, and you will be automatically KO'd after the noko ends, if you turn it off and on. You can use a selfstate with a lifeset whilst the NoKo is active to create a resurrection effect, where it looks like p1 has been KO'd by p2, but comes back from the dead.

The problem is that some OHKO's are so quick that they will bypass right through it and kill p1 before the NoKo and SelfState are activated, making p1 KO'd first, and SelfStating after, because the SelfState will still happen.

I feel like that the reason that some OHKO's slip past my resurrection method is because I rely too heavily on that NoKo flag to prevent the KO signal from happening whilst life is at 0. I've observed another character called Fallen-Sanae, and when she is on simultaneous mode with a teammate, she will only die if her teammate dies, she will not be KO'd if her teammate is still alive.


I tried to look at her code. It seems her Statedef 5150 is changed so that it looks like this:

Code:
[Statedef 5150]
type=U
movetype=U
physics=U
hitdefpersist=1
movehitpersist=1

[State ]
type=Null
Trigger1=1
persistent=256
ignorehitpause=1


Of course, you can't just not have a Statedef 5150, but getting rid of everything and putting a null there keeps your character functioning whilst effectively "getting rid of" that state. I tried to copy this to no avail. It seems that was not the reason she could keep fighting whilst she had no life left in simul mode.

I think it's because of a helper. She's using a helper, or a combination of helper(s) and the NoKo flag to achieve being able to stay "alive" whilst her life is at 0.

Whether or not the NoKo flag holds p1s life at 0 or 1 is kind of irrelevent, because once the NoKo ends p1 still dies. In most cases, the SelfState is triggered in time to LifeSet p1 so that it doesn't die, however, if p2 is good enough then the KO signal happens before the SelfState, resulting in a dead p1 with a life value of 350, which is just unappealing.


If there's a way to use helpers to prevent death from happening while p1's life is at 0, so that they can SelfState uninterrupted, I'd like to know how, if that's not how it works, then I'd like to know how it does work if possible. I only think that it's helper related because I don't see any other way, and because I still don't fully understand how they work.
Last Edit: November 03, 2019, 01:38:59 am by Disconcorde
Re: life = 0 and not KO'd using helper?
#2  December 11, 2019, 04:22:56 am
  • avatar
  • *
    • Vietnam
At least you should spend some variable to maintance your life point.

When NoKo flag is triggered. Both player can't be KOed in any circumstance, except when your life point is 0, it will maintance our lifepoint to 1 until the flag is no longer triggered then you will be KOed, unless you have some piece of code that re-fill your lifepoint greater than 1. In that case your ass will NOT be KOed if Noko is un-flagged.

About OHKO, you should known when your char is being hitted by any hitdef or projectile, you still not KOed, but after 1 ticks from that hit, when your lifepoint is 0, you done. That reason is Mugen engine need to spend 1 ticks to made this caculaiton "your next life point = your previous life point - damage point you recieved from hitdef or projectile"

So basically, if you use this trigger "life = 0 && gethitvar(damage) >= (value)"
--> Noko flag won't work and you will constantly KOed even you have SelfStating or lifeset.
------Tremble Mortal and Despair. Doom has come to this world------