Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How would I go about make a message system like the one in Presentable liberty?

Discussion in 'Scripting' started by SaamBell, Feb 27, 2016.

  1. SaamBell

    SaamBell

    Joined:
    Mar 28, 2014
    Posts:
    128
    Just to state I'm not asking anyone to write the whole code for me or anything I just want some pointers were to look into to build this sort of system for myself!

    For anyone who hasn't played or seen a play-through of Presentable liberty I'll give you a little explanation of the system and back-story (based on what I can remember). Your character wakes up in a jail cell and has nothing but a bed. After a little while you receive a letter slipped through the gap in the door. These letters are mailed to you from different characters throughout the play-through and all of them have a different subject to talk about. This is the system I want to try and re-create in my own dynamic experience.

    This seems to be how the system works:

    Time starts
    Letter is mailed through door (nothing happens until you click the letter)
    when the mail is opened and closed a timer probably starts until the next message is set to be delivered
    next mail is delivered
    continues

    Whilst this seems relatively simple their were a few things I was unsure about. One of them being how the creator tested certain mail deliveries times out without having to play through the whole game again for one.
    Anyone have any idea where I should look into to create something similar to this :)?

    PL.jpg
     
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,380
    Well, if you unit test the timer, you can be farely certain that it should work for all times.

    All that is needed now is to make sure you setup the configuration with the correct times.

    And of course, when all said and done... any released game SHOULD be tested from beginning to end.



    As for pulling it off. You seem to have the algorithm figured out. It's rather simple. Could be easily done with a coroutine or the sort. Is there a specific thing you need help with?
     
  3. SaamBell

    SaamBell

    Joined:
    Mar 28, 2014
    Posts:
    128
    I've never really left the zone of using simple bools and if statements as I am not the most experience programmer and was just having fun trying to create various game mechanics and features! Should i look into Coroutines for this type of thing then :)?
    Another thing I forgot to include is I'd have to find some way to pause the timer as a new letter is posted as if the time is up and the old letter hasn't been read it will likely destroy the first game object and make the player miss a part of the story:)!