Forum rules - please read before posting.

Objectives

How do I create objectives in my game? I have made a prototype where there is a keycard that opens a door, the next step is to let the player know what to do. I created a Cutscene called objectives where I have a Inventory:Check and two dialouges depending on whether or not the player has the keycard. Right now I think the system works but the dialouge-text appears for a very small amount of time. I want it to show for as long as it has to depening on whether the player has the item or not.

For example: Player does not have the keycard = Text showing "Get the keycard" is visible until the player picks up the item, and then the next objective will be shown.

P.S Just gave AC 5 stars on the Unity asset store, this tool is amazing! :)

Comments

  • Glad you're enjoying it, thanks!

    Rather than displaying this text as speech, you'd instead want to place it in a Menu Label element.  New Menus, and a Label to go inside it, can be created in the Menu Manager (a series of tutorials on using it can be found here).

    Normally you'd enter in some static text to go in your Label, but ideally you'd want this to be dynamic so that you can change the "current objective" as your game progresses.  There's a handy feature you can use to that end: variable tokens.

    Create a new Global variable of type "Pop Up", and you'll be able to create a series of string values, e.g. "Get the keycard", "Open the door", etc.  In the variable's list of properties, there'll be a "Replacement token" field: something like [var:3].  If you enter that token e.g. "[var:3]" into your Label, then it will be replaced by that variable's value, e.g. "Get the keycard".  You can then control what objective text is shown by using the Variable: Set Action to change the PopUp variable's value.
  • Worked like a charm, thank you!

    Found a couple of new questions tho :)

    1.) If I want to have let´s say "Open door" as an objective, how do I tell my "objectives actionslist" that the door has been activated? Right now I have Inventory: Check for keys as objectives but I can´t really figure out how to add objectives that´s not inventory-based. 

    2.) Is there a way to make the menu check the variables in real time? If I have my objectives"menu" set to a button and activate it and complete objectives the menu doesn´t update until i deactivate it and activate it again. I tried to turn the menu on/off before/after every objective but it doesnt work.
  • 1) If you've followed my last post and stored each objective as a "Popup" entry in a Global Variable, then you can just use the Variable: Set Action to change the current objective.  It doesn't matter where it's being called from - whether it be inventory or not.

    2) If the menu simply displays the current variable using tokens, then it'll update in real-time as you change the variable's Action automatically.
  • Ok I was doing it wrong from the beginning, I had an actionlist attatched to the menu instead of having the interactions on the items themselfes change the variable so now it works! And the solution to the first problem solved the second problem to it seems, the text updates automaticlly now.

    Thank you! 
    :D
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.