Skip/Auto Button Help
Re: Skip/Auto Button Help
Is conversation 2 keyed off of conversation 1 somehow, so that conversation 2 starts immediately after conversation 1 ends? Or does some time pass between them before conversation 2 starts?
I'm trying to get an idea if there's some kind of timing/overlap issue. Your skip button code looks fine to me, so I don't have an idea yet of what could be causing the issue.
Re: Skip/Auto Button Help
Thanks so much for helping troubleshoot this (and everything always)
Here is the full order :
Startconversation (0) is called (by string + int0) with actor being empty gameobject
when conversation0 ends, the empty gameobject runs :
here is what "IntroNext" does :
the 2 images changed has no incidence on the conversations at all... then it starts "ConversationName1" (first one was "ConversationName0")
this goes on and on until 15... with more stuff happening inbetween... but only 1,2,3 happens one after the other...
should i try an "invoke("StartConversation()", 1f)
(TRYING NOW BEFORE SUBMIT)
HOLY FUCK YOU'RE GOOD!! hahahahaha...
it fixed it!!
so it was being called too fast...
I'll reduce the 1f for something smaller like 0.2f...
anothing problem fixed!! THANKS!!
Here is the full order :
Startconversation (0) is called (by string + int0) with actor being empty gameobject
when conversation0 ends, the empty gameobject runs :
Code: Select all
public void OnConversationEnd (Transform gm)
{
GV.inCutscene = false;
if (GV.boolNewGame == true)
{
FindObjectOfType<IntroGM>().IntroNext();
return;
}
Code: Select all
public void IntroNext ()
{
intFightPhase++;
if (intFightPhase == 1)
{
imageBackground.sprite = listBgImages [1];
imageGirlFight.sprite = listGirlImages [1];
StartConversation ();
return;
}
this goes on and on until 15... with more stuff happening inbetween... but only 1,2,3 happens one after the other...
should i try an "invoke("StartConversation()", 1f)
(TRYING NOW BEFORE SUBMIT)
HOLY FUCK YOU'RE GOOD!! hahahahaha...
it fixed it!!
so it was being called too fast...
I'll reduce the 1f for something smaller like 0.2f...
anothing problem fixed!! THANKS!!
Re: Skip/Auto Button Help
Whew!
One frame would be enough delay. I think the problem is that OnConversationEnd gets called on the same frame in which it's still closing the conversation.
If at some point you really want to pare down the delay to the barest minimum, this would do it:
One frame would be enough delay. I think the problem is that OnConversationEnd gets called on the same frame in which it's still closing the conversation.
If at some point you really want to pare down the delay to the barest minimum, this would do it:
Code: Select all
public void OnConversationEnd (Transform gm)
{
GV.inCutscene = false;
if (GV.boolNewGame == true)
{
StartCoroutine(IntroNextAfterOneFrame());
}
}
IEnumerator IntroNextAfterOneFrame()
{
yield return null; // Wait 1 frame.
FindObjectOfType<IntroGM>().IntroNext();
}