News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

bad math

Started by Riptide, June 29, 2011, 12:25:38 PM

Previous topic - Next topic

Riptide

I mean change the walking or running speed, but it looks impossible.

defiance mul is broken  :-\
It could still be of some use but not much.

I radically changing the trigger code. I have it set so the var only changes when the P1, P2 life ratio in in a certain range

but I have a problem which is hard to describe. The transformation is limited(triggerall) by you being between 100 Hp below to 200Hp above P2 and the gametime being above 40 seconds.

However I want to trigger the transformation( trigger1) only when both p1 and p1's life is below a certain number and either the gametime is above like 55.
Or more accurately: If P1 and P2's life drops quickly in a small amount of time.

I don't know how to code the more accurate trigger. I can't think of anything to use to do this.

Cyanide

Create a helper that lasts for your period of time. At the start have it save p1 and p2's life to a variable. At the end, have it check their life against that variable. If the value is within the range you want, use parentvarset

time = 0
var(1) = parent, life
var(2) = parent, life

type = parentvarset
triggerall = time = 190
trigger1 = var(1) - parent, life > 100
trigger1 = var(2) - enemy, life > 100
value = transformation variable

You could probably do it MORE elegantly tbh. But a helper frees up the 2 variables and discounts any worries about the value of gametime, or using time itself or even creating a var counter. And if it freezes during opponent superpause, so what, so would your character.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Riptide

hum.... but what if I wanted to check any part of the round for a drastic change in life in P1 and P2.

like if both characters were doing nothing then suddenly started fighting.

Riptide

is there a way to use gametime to fire off the helper like every 30 tics to check for drastic drops in life remove it and call it again
in 30 tics.

So I could have the helper check constantly instead of checking only once during the round?

I know it's complicated but what are some other ways of making this work.

Rajaa Retired

Read up on %, the mod operator.

GAMETIME%30 = 0

=

Trigger every 30 tics starting from gametime = 0.