Forum rules - please read before posting.

How to make a sms group chat game?

Hello, is AC a good choice to make a game based only on a group chat?
Like is it possible to have a game where the player makes choices to progress the story through chat messages? I would also need to know if it's possible to change character played when I go from a level to another.
If it is, how can I implement it through AC?

THank you so much!


  • Welcome to the community, @pavemi95.

    is it possible to have a game where the player makes choices to progress the story through chat messages?

    Built-in, AC displays dialogue text in separate Subtitle menus for each character. To have text appear in a "log" format, where each line is added below the last, you'd need to rely on custom scripting.

    This script, ChatLog.cs, demonstrates this by hooking into the OnStartSpeech custom event to add each dialogue text to a Unity UI Text component:

    using UnityEngine;
    using UnityEngine.UI;
    using AC;
    public class ChatLog : MonoBehaviour
        public Text chatLog;
        private void OnEnable () { EventManager.OnStartSpeech_Alt += StartSpeech; }
        private void OnDisable () { EventManager.OnStartSpeech_Alt -= StartSpeech; }
        private void StartSpeech (Speech speech)
            chatLog.text += speech.log.fullText + "\n";

    You can adapt this to show e.g. the character's name, use different colours, etc, but it's not too complex.

    More difficult would be letting the player type messages to the chat, and have the game process this into game logic.

    AC has a conversation system that involves choosing from a set of pre-written options (you can find a tutorial here).

    These options can then be set to run game logic when chosen - they don't necessarily need to run speech, they can also e.g. update variables to keep track of the Player's choices.

    To allow the player to select options by typing, you'd need to have strong scripting skills to parse the text into something the game can understand.

    I'm only speaking generally, however - if you can share more details (or screenshots) to elaborate on how your intended mechanics work, I can give more specific advice.

    I would also need to know if it's possible to change character played when I go from a level to another.

    If you place a Player character in a scene, then that Player will be the active Player while that scene is open.

    AC also has a Player-switching system, that allows for the active Player to be changed on the fly - as well as keep non-active Player characters where they were last left. A tutorial on this system can be found here.

  • I've expanded the ChatLog script above to add a couple of additional features - it can be found on the AC wiki here:

  • If you are ONLY going to use a chat feature, i could recommend "YarnSpinner" which also has an example for it. That could be a solution for you pavemi: , the sample is called "Phone Chat" and could be exactly what you want.

  • Hi, thank you so much for your answer, maybe I wasn't clear enough though. Sorry for my bad English.
    I want to make a game like this: Is it possible? If so, how can I make it thorugh AC?

  • One small note about the solution Chris offered (I've used a similar one myself): it doesn't work too well if you allow the player to change the language mid-game. For example, if you switch the language from English to Spanish, the chat log will remain in English and only new messages will appear in Spanish.

    But you should be able to code support for this by declaring chatLogEN, chatLogES, etc and pulling localised text for each one of them simultaneously, and then displaying the correct one depending on the language the player has selected.

  • @pavemi95 What you're looking for is the TextLine Project for Dialogue System. That asset is tightly integrated with AC actually, but you need to buy it first.

  • @pavemi95: Thanks for the elaboration. For that kind of UI complexity, I'd suggest a dedicated asset. I'd second @Gregorik's suggestion of using Dialogue System - it's an excellent asset and has a robust AC integration.

    @Rairun: That's a good point. Another (though more complex) solution would be to have the ChatLog script keep track of the SpeechLine instances themselves, and re-generate the log from these each time the language is changed by hooking into the OnChangeLanguage event.

    I'll see if I can amend the wiki script to do this.

  • Thank you so much for your answers! You rock, guys! :)

  • Also if you are interested in Dialogue System, it is currently on sale through humblebundle, with a lot of other stuff for about 30$:

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.