Forum rules - please read before posting.

Optimise menus

Good day

I don't have a problem as such, but would like to determine if there is a more efficient way to use menus in my game, specifically the back button. It is a 2D game, and when the player clicks on a character in a scene the game zooms in for the conversation. I have created a menu button that returns the game to the original, high-level scene view when clicked. This works well, but when a similar scenario arises in the next scene I have to create a new button to return the player to the new scene view after the conversation.

Basically, with the way I've implemented it, I would need a new menu with a back button for every scene where I want to zoom in and return afterwards. Is this the best way to implement the back button, or is it possible to create a universal menu that will return the game to the high level scene view? Also, is it common to create a lot of new menus, I find it very useful, but can easily see my game using many, many of them. I'd like to say more than a hundred, but it probably won't be as bad as that!

Thanks.

Comments

  • You wouldn't need to create a new Menu for each "close up" instance - you can rely on ActionList parameters to re-use the same Menu/Button for each situation.

    ActionList parameters are a way of repurposing ActionLists for different situations, by modifying field values at runtime. A tutorial can be found here.

    What parameters and fields you make use of exactly will depend on your situation, but one technique could be to simply define a GameObject parameter that is used to override an ActionList: Run Action's ActionList to run field. This could then be set to another ActionList that contains the unique Actions needed for exiting that particular close-up (e.g. switching to the correct camera).

    At the time that the close-up begins, you can set your Close-up's Button ActionList parameter values with another ActionList: Run Action, with its Method set to Set Parameters Only.

  • Thanks Chris, I'll give this a try. Sorry to reply only now, but I was travelling for work and only returned this weekend.

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.