YesNoOk
avatar

Targetlifeadd every frame (slower?) (Read 436 times)

Started by Momotaro, November 02, 2021, 12:59:58 PM
Share this topic:
Targetlifeadd every frame (slower?)
#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.

how can I adjust it?
Thanks

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

Trying Kinu Nishimura Style for custom portraits...

https://twitter.com/MomotaroComics/
https://www.instagram.com/momotarocomics/
Last Edit: November 02, 2021, 03:37:07 PM by Momotaro
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
https://www.youtube.com/watch?v=7bM9DpmVXOA
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://twitter.com/MomotaroComics/
https://www.instagram.com/momotarocomics/
Re: Targetlifeadd every frame (slower?)
#4  November 02, 2021, 03:52:41 PM
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
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 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
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...

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