The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Topic started by: Jecht Marchrius on February 23, 2019, 02:40:14 am

Title: n00b question - What does !Time mean?
Post by: Jecht Marchrius on February 23, 2019, 02:40:14 am
Some examples would help, thanks!
Title: Re: n00b question - What does !Time mean?
Post by: ink on February 23, 2019, 03:33:12 am
A trigger like !time or time = 0 will trigger at the start of the state. Time = 10 will trigger 10 ticks into the state.

You can read about it more in depth here.
http://mugenguild.com/forum/topics/time-triggers-169794.0.html
Title: Re: n00b question - What does !Time mean?
Post by: Jecht Marchrius on February 23, 2019, 08:09:26 am
Thanks ink! I have another noob question but it's off-topic. There are times when I see other coders use the Anim trigger without putting any values whatsoever afterwards (ex. "trigger1 = anim" or "value = anim"), and I don't know what it actually means
Title: Re: n00b question - What does !Time mean?
Post by: Bannana on February 23, 2019, 08:42:31 am
Do you have an example?

Generally anim has a value afterward to define a different animation than the current state, otherwise it returns the current anim
For example here's a selection from the 212 state of (9)'s Sion:
Code:
;---------------------------------------------------------------------------
;E5B
[Statedef 212]
Type    = S
MoveType= A
Physics = S
Juggle  = 0
Ctrl = 0
Anim = 212
SprPriority = 2
Facep2 = 1

[State -1]
Type = ChangeAnim
TriggerAll = Var(59) <= 0
Trigger1 = Anim = 212
Trigger1 = Var(55) = 1
Trigger1 = Time = [4,14]
Value = 213

[State -1]
Type = ChangeState
TriggerAll = Var(59) <= 0
Trigger1 = Var(55) = 0
Trigger1 = Time = 14
Value = 213

[State -1]
Type = PosAdd
Trigger1 = Anim = 213
Trigger1 = AnimElem = 1
X = 10
If the PosAdd was Anim without definition then it should refer to 212.
Title: Re: n00b question - What does !Time mean?
Post by: ink on February 23, 2019, 02:02:37 pm
So the way I think of it, if a condition of a trigger is true it will return 1 if not it will return 0.

For example
Trigger1 = 0 will not trigger at all, trigger1 = 1 will always trigger.

I say this because all triggers work this way.
Code:
Trigger1 = anim ; if anim = 0, this will not trigger 
Code:
Trigger1 = time ; if time = 0 this will not trigger. But will trigger 1 tick later.


You’ll see ones like this too:
Code:
Trigger1 = !time ; which means time does NOT = 1 or is the same as time = 0. I prefer to write my code the long way for clearity.

!Time, Time = 0, Time < 1 are all the pretty much the same.


Value = Anim ; means the value of the current animation(at the time of trigger) will be what’s used for the value. I would say this is not a common one to see.
Title: Re: n00b question - What does !Time mean?
Post by: Jecht Marchrius on March 01, 2019, 09:34:33 am
Thanks for clearing it up for me Bannana and ink!
Title: Re: n00b question - What does !Time mean?
Post by: Odb718 on March 03, 2019, 08:34:55 pm
@Jecht Marchrius: You may want to read up on this.
http://mugenguild.com/forum/topics/anim-vs-animelem-vs-animelemno-vs-animelemtime-vs-animtime-169010.0.html
Title: Re: n00b question - What does !Time mean?
Post by: Jecht Marchrius on March 15, 2019, 04:13:08 am
@Jecht Marchrius: You may want to read up on this.
http://mugenguild.com/forum/topics/anim-vs-animelem-vs-animelemno-vs-animelemtime-vs-animtime-169010.0.html

Hey! Thanks for the in-depth tut. Am usually just using AnimElem in my chara right now since I'm still new to this