Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(4 edits)

Alright, this might need fixes since the code is just off the top of my head, but this is a basic way i'd have done it with UpdateBlocking.

In Header:

int m_combatCharacterId = -1;

In UpdateBlocking():

// Only try and show a dialog if there's none showing
if ( D.Current == null ) 
{
    // Can add more characters here if necessary
    ICharacter[] characters = new ICharacter[]{C.Jonah, C.Goliath, C.Eddy, C.NurseJan};
 
    // Increment which character we're trying to show this update
    m_combatCharacterId++;
    if ( m_combatCharacterId >= characters.Length )
        m_combatCharacterId = 0;
     
    // Grab the character, and start their dialog tree if its time
    ICharacter character = characters[m_combatCharacterId];
    if(character.IsDead() == false && character.JoinedParty == true && character.TurnOrder == Character.TurnOrderMode.None)
    {
        Display: Showing {character.ScriptName} combat menu
        E.GetDialogTree(character.ScriptName+"CombatMenu").Start();
    }
}
End

Very clean!

I hope you will forgive me, my original code worked similar but I kept being puzzled by nuances of the implementation, I was never quite certain if the code was doing what I thought it was doing.

Going to try to drop this in to see if it works, thanks again.