YesNoOk
avatar

What does !time mean in mugen?  (Read 12437 times)

Started by TheDragon, November 29, 2022, 11:04:26 pm
Share this topic:
What does !time mean in mugen?
#1  November 29, 2022, 11:04:26 pm
  • **
As the name of the title says, I would like to know what function has "!time" in mugen, I have been searching the Internet and I did not find anything about that, does anyone know what this trigger means?
Last Edit: November 30, 2022, 06:06:22 am by TheDragon
Re: What does !time mean in mugen?
#2  November 30, 2022, 02:26:03 am
  • *
  • Super Gamers
  • Twins who play games.
    • Brazil
    • sites.google.com/view/gemeos-dos-jogos
Hello, how you are? !Time mean Time <= 0 (also it's Time = 0).
Last Edit: November 30, 2022, 02:30:00 am by Gêmeos dos Jogos
Re: What does !time mean in mugen?
#3  November 30, 2022, 05:07:51 am
  • **
I'm fine, so !time is the same as time = 0? Right? Thanks for the help!
Re: What does !time mean in mugen?
#4  November 30, 2022, 05:45:51 am
  • ****
    • China
    • http://vans.trinitymugen.net/
Hello, how you are? !Time mean Time <= 0 (also it's Time = 0).

This is incorrect. It means "time" is not true, and this is if and only if it attains no value other than 0. So "!time" and "time = 0" are equivalent.

"time <= 0" is NOT equivalent to "time = 0" because "time = -1" exists, and it is a real state-time where malformed triggers (such as trigger1 = 1) are evaluated.
Re: What does !time mean in mugen?
#5  November 30, 2022, 06:06:09 am
  • **
Oh thank you, now I understand thank you both very much
Re: What does !time mean in mugen?
#6  December 01, 2022, 01:58:06 pm
  • ****
Hello, how you are? !Time mean Time <= 0 (also it's Time = 0).

This is incorrect. It means "time" is not true, and this is if and only if it attains no value other than 0. So "!time" and "time = 0" are equivalent.

"time <= 0" is NOT equivalent to "time = 0" because "time = -1" exists, and it is a real state-time where malformed triggers (such as trigger1 = 1) are evaluated.

Can I know when time will be =-1?
I thought it start from 0
only animtime will be -1
Re: What does !time mean in mugen?
#7  December 01, 2022, 02:15:15 pm
  • ****
    • China
    • http://vans.trinitymugen.net/
Time = -1 occurs in the transition between two statedefs. This is a basic example:

Assume you have Statedef x, Statedef x+1 and Statedef x+2. And assume you have the following flow of states:

GameTime       State

Y                      Statedef x [on-screen]
Y+1                  [change state] Statedef x+1 => [change state] Statedef x+2 [on-screen]

What I wrote above means that the character went through two changestates in frame Y+1. However, it does not mean that Statedef x+1 did "not exist", as you can write logic inside and it will still be processed (as otherwise, statedef x+2 would not be on-screen at all). Some logic within statedef x+1 is evaluated in time = -1, particularly all triggers of the absolute form trigger1 = 1 (always true). You can actually observe "time = -1" written in displaytoclipboard by cleverly using pauses and targetstates. If that state transition is stretched way beyond the scope of one frame, all of that transition is time = -1.

Most people write trigger1 = 1 when they mean trigger1 = time >= 0 or even time > 0. These triggers are not equivalent and the malformed trigger1 = 1 will always be erroneously evaluated during state transitions.

This is part of the reason the physics in common1.cns are broken. I patched this when I released Angel many years ago.
Last Edit: December 01, 2022, 02:23:23 pm by Vans
Re: What does !time mean in mugen?
#8  December 01, 2022, 02:42:16 pm
  • ****
Re: What does !time mean in mugen?
#9  December 01, 2022, 04:26:05 pm
  • ******
    • Portugal
    • network.mugenguild.com/pots/
Just to add to what Vans said (also, sup), you can see time = -1 easily in the frame where the char gets hit by an attack.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.