Started by Momotaro, November 02, 2021, 12:59:58 PM

#### Momotaro

#1  November 02, 2021, 12:59:58 PM
• A.K.A. NED
• "Videl's Chapter" "3RD PAGE on Twitter !
I'm using this code
to drain energy in every frame from an animelem.
but the value -1 is too big.
I would like something smaller, but of course any value like -0.5 is not possible.

Thanks

Code:
`[State 2550, Hurt 11]type = TargetLifeAddtrigger1 = AnimElemtime(5) >= 0value = -1kill = 1`

Trying Kinu Nishimura Style for custom portraits...

https://www.instagram.com/momotarocomics/
Last Edit: November 02, 2021, 03:37:07 PM by Momotaro

#### Lasombra Demon

##### Re: Targetlifeadd every frame (slower?)
#2  November 02, 2021, 02:24:58 PM
• WIP: Tons and tons of IKEMEN stages
Add a trigger1 = time % 2 = 0?
Current release: SF vs MK, fully interactive

#### Momotaro

##### Re: Targetlifeadd every frame (slower?)
#3  November 02, 2021, 03:05:22 PM
• A.K.A. NED
• "Videl's Chapter" "3RD PAGE on Twitter !
Add a trigger1 = time % 2 = 0?

Oh, thanks a lot, it worked perfectly.
This is exactly what I was looking for.
I'm not sure to understand the logic of these maths stuffs.

I don't get how 2% of time or something is used. ^^;

Trying Kinu Nishimura Style for custom portraits...

https://www.instagram.com/momotarocomics/

#### XGargoyle

##### Re: Targetlifeadd every frame (slower?)
#4  November 02, 2021, 03:52:41 PM
• Hedgehog Whisperer
I don't get how 2% of time or something is used. ^^;

Learn about the modulus function (remainder).
%2=0 means that any amount divided by 2, should have a remainder of 0. In other words, it will trigger only half the ticks (becuase the other possible remainder of %2 is 1)
 XGargoyle: Battle posing since 1979http://xgargoyle.mgbr.nethttp://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that linkhttp://paypal.me/XGargoyle  <-- Donations welcome!

#### Momotaro

##### Re: Targetlifeadd every frame (slower?)
#5  November 02, 2021, 05:06:37 PM
• A.K.A. NED
• "Videl's Chapter" "3RD PAGE on Twitter !

Trying Kinu Nishimura Style for custom portraits...