YesNoOk
avatar

Pause in Intros Issue (Read 1095 times)

Started by Kolossoni, June 14, 2019, 02:12:44 am
Share this topic:
Pause in Intros Issue
#1  June 14, 2019, 02:12:44 am
  • **
  • | The Awakened |
  • <My Work is Antiquity>
    • South Korea
    • sites.google.com/view/kolossoni-mugen
Pauses during intros create a weird bug I've never encountered before.

I added a helper at time = 0 on one of the intros and added this code into it.
Code:
[State 0, Pause]
type = Pause
trigger1 = (time%1) = 0
time = 2
movetime = 2
pausebg = 0

Since making the "time = t" and "movetime = t" too long it will make the animations stagger after skipping, therefore I stuck with the time% code as it will provide less of a hassle.
The reason for putting 2 on time and movetime is because 1 causes the pause to flicker on and off every 1 tick, so I put 2 ticks just so it won't do that.

Problem is, if the helper is destroyed (from expiring, NOT from intro being skipped), the "Round X" announcement shows up immediately, ultimately repeating itself twice. (1 from helper being destroyed & 1 from the actual intro being over.)

Any suggestions to prevent the first announcement from showing up?
Re: Pause in Intros Issue
#2  June 14, 2019, 04:59:37 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
How about let the helper linger until the Intro is over?

[State 0, Pause]
type = Pause
triggerall = RoundState = 1
trigger1 = (time%1) = 0
time = 2
movetime = 2
pausebg = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = RoundState = 2

Re: Pause in Intros Issue
#3  June 15, 2019, 06:04:55 am
  • **
  • | The Awakened |
  • <My Work is Antiquity>
    • South Korea
    • sites.google.com/view/kolossoni-mugen
The Roundstates won't work as RoundState = 1 means pre-intro & RoundState = 2 means fighting period. The helper needs to be in between the intro phase of the game.

Plus, the pause helper should only exist for a small amount of time.
So basically:
Stage entered -> Pause freezes everyone (helper) -> pause finished -> Players do their normal intros -> game begins normally.


[State 0, Pause]
type = Pause
triggerall = RoundState = 1
trigger1 = (time%1) = 0
time = 2
movetime = 2
pausebg = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = RoundState = 2

This will make the helper keep pausing the game every 1 tick meaning the destroyself part will actually never come to play as it will be postponed until the actual pause is finished.
Re: Pause in Intros Issue
#4  June 16, 2019, 07:28:11 am
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Ahhhh m’bad!

Well why not just throw another condition into the Pause controller, so that the helper can stay until the entire intro is over?  Like triggerall = Time < whatever.  And destroyself, time > whatever?

Re: Pause in Intros Issue
#5  June 19, 2019, 01:38:31 pm
  • **
  • | The Awakened |
  • <My Work is Antiquity>
    • South Korea
    • sites.google.com/view/kolossoni-mugen
Well, you see then that would be no different from my initial codes.
For example,

Triggerall = time < 100
&
destroyself
time >= 100

would mean that the pause will stay until time reaches 100.
But the problem with pause is that the separate sctrl which includes time and movetime all act differently from the triggers themselves.
So,
Code:
Pause
Triggerall = time < 100
trigger1 = time = 0
time = (X)
movetime = (X)

Destroyself
time >= 100
will be no different from
Code:
Pause
Trigger1 = time < 100
time = (X)
movetime = (X)

Destroyself
time = 100

The time & movetime is what's causing the problem.
Re: Pause in Intros Issue
#6  June 19, 2019, 04:46:03 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
In your original code, you are triggering a Pause once every 2 ticks, for 2 ticks, forever.

So I imagine that your DestroySelf is probably the thing that you are using to stop your Pause, right?

What I'm saying is that you can just stop your pause after a certain time like

[State 0, Pause]
type = Pause
triggerall = Time < 100
trigger1 = (time%1) = 0
time = 2
movetime = 2
pausebg = 0

Then Destroyself whenever.   Time > 9,000 for instance - long enough for the helper to exist until the Intro phase has ended.  This is an invisible helper right?


If you have changed your original Pause controller code, please share it so we can work this out differently.

Re: Pause in Intros Issue
#7  June 20, 2019, 04:07:42 am
  • **
  • | The Awakened |
  • <My Work is Antiquity>
    • South Korea
    • sites.google.com/view/kolossoni-mugen
Yep, my original code still provides that same mechanic.
The pauses are not the issue at all.

Whether it is destroyed or not, the biggest issue is that during intros, if a pause is added, then finished, the announcement for the round (i.e. round #, fight!) will happen imediately.
Now, everything will be fine it's just that that specific announcement is totally unncessary as when the actual intros are over, the real once plays again (meaning it will play twice).

Since this was probably never detected before, I suggest you try adding a simple pause like our codes above in a character that expires, and see what happens. It's super weird...
Re: Pause in Intros Issue
#8  June 20, 2019, 04:23:23 am
  • **
  • Don't copy code if you don't understand it.
    • USA
    • a13rown@hotmail.com
O.k. quick question....... Your creating a pause helper to momentarily freeze everyone's intro correct?  I just wanted to know the correct intention before I give my suggestion.
Re: Pause in Intros Issue
#9  June 20, 2019, 05:26:18 am
  • **
  • | The Awakened |
  • <My Work is Antiquity>
    • South Korea
    • sites.google.com/view/kolossoni-mugen
Yes. That would be correct, sir.
Re: Pause in Intros Issue
#10  June 20, 2019, 11:34:15 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Superpause will behave differently. You could try that instead.

I'm not clear on why its a multi trigger thing. Why not just pausetime of 100 or something? If you skip the intro it'll kill the pause and helper anyway. I can't see why you'd multipause it. Unless the helper is supplying a menu function and needs to move for that.


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.
Re: Pause in Intros Issue
#11  June 20, 2019, 11:51:43 am
  • **
  • | The Awakened |
  • <My Work is Antiquity>
    • South Korea
    • sites.google.com/view/kolossoni-mugen
Hi, Cyanide.
I have tried before using a normal pause trigger.
But the longer the input gets for time & movetime, the effects linger on even after skipping the intro and killing the helper.

I tried superpause as well and that makes the same effect.

So pausing for 150 ticks and skipping will cause the players to stay still for 150 ticks even when the round has started.
Re: Pause in Intros Issue
#12  June 20, 2019, 04:43:00 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
So I don't 100% get what you're doing but maybe this thought process will help you get to the solution... at least for the "skipping intro" aspect.

How about, during this particular intro, you immediately capture the GameTime to a Var.
Then in State -2 or State 0 or wherever, have a Pause controller that is intended to override / cancel the Pause from your intro... with a parameter of TIme = 0.

Use these triggers for the Pause to check if the entire Intro played out - and will trigger if the intro was skipped:

triggerall = var(xx) != 9999999 ;If it has not yet be triggered.
trigger1 = var(XX) + (YOUR INTRO'S TOTAL LENGTH) > GameTime
trigger1 = var(xx) := 0 ;set the Var to 9999999 when triggered, since you can't use persistent in State -2

Re: Pause in Intros Issue
#13  June 20, 2019, 05:24:58 pm
  • **
  • | The Awakened |
  • <My Work is Antiquity>
    • South Korea
    • sites.google.com/view/kolossoni-mugen
Oh, thanks.
I'll check it out!

Thanks for the considerate replies.