YesNoOk
avatar

GetHitVar(hittime) for a custom state (Read 3958 times)

Started by BobijsVarenais, February 08, 2023, 08:36:08 am
Share this topic:
GetHitVar(hittime) for a custom state
#1  February 08, 2023, 08:36:08 am
  • avatar
    • Latvia
Hi, I'm having problems with a custom get hit state. (slidetime) seems to work, but (hittime) doesen't.

[Statedef 5105]
type = C
movetype= H
physics = C
anim = 5105
sprpriority = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem = 1 ; time on the first frame is 99999999
trigger1 = time >= GetHitVar(slidetime) ; when slidetime is over it jumps to the rest of the hit animation
value = 5105
elem = 2

Can anyone explain this to me please? :D Been making stuff in mugen for 10+ years, but always avoided "gethitvar"
Re: GetHitVar(hittime) for a custom state
#2  February 15, 2023, 09:33:24 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Animelem = 1 is true for 1 tick and its the first frame of that animelem. Use

Trigger1 = animelemtime(2) < 0

Instead.


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.