Jump to content
Titanhex

Thex Custom Events Menu

Recommended Posts

Part of:          Thex Tutorial & Demo Systems

 

DEMO: Thex Custom Events Menu

 

What is this?

 

Excerpt from the Intro Event comments:

 

 

 

" Welcome to the Custom Menu tutorial.

This is an intermediate to advanced tutorial.
The demo shows off how to make a menu using events.

It's composed of button input processing, characters, and a
selector.
It keeps track of position using an index variable and X-Y
coordinates.

To begin creating the menu from scratch simply follow the process.
Be sure to also check events for comments to better understand
what's happening.

 

First we need to create several blank events. The number of blank
events we create should be equal to the number of choices we want
in our menu + 1. The extra event is for the selector.

 

Once we've created the blank events we need we can start on the
menu.

A menu done in this way should be grid based, consisting of rows
and columns and a distance between each item.

 

We should decide what each menu item will be represented by,
and what it will do.
The best graphics are a simple 32x32 size, since this size or
smaller fits into the selector the best. We've ignored that advice for
the tent though.

 

Once you've got your menu thought up, it's time to create the
event that activates the menu.
This should be a simple Action button event.

 

First disable the menu. Then we want to move all our events in to
position by getting the X and Y of the event. We have to be careful
to make sure there's room in the map for the events to be placed.
The Tent and Character Menus both do a bit of fancy moving, since
they're simple 2x2 grids. The Grid Maker simply makes the events
instantly.

 

We also set the min X and min Y of the Grid, which should be
top-left in the grid. This is where our selector will always start.

By knowing the min X, min Y, distance, rows, and columns we can
tell where the max X and max Y will be.  The min and max let us
know how far the selector should go before scrolling.

 

So then we set all the graphics for the items in the menu and the
selector. Next we do a loop that will check for button presses. On
each directional button press we run checks and changes on menu
index and selector position.

 

Enter and Esc simply break the loop and play a sound.
Esc sets the Menu Index to 0 though so it doesn't select any menu
items.

 

Because the menu index is updated every time we press a buton
we just check the index after the loop. Remember in our menu grid
we're counting left to right, then top to bottom:
1 - 2 - 3
4 - 5 - 6
7 - 8 - 9

 

So as long as we know where each item on our menu is we know
what each Menu Index should do.  If there's a rabbit in the 1 place
maybe we give a rabbit as a giftif the Menu Index == 1.

 

At the end we just clean everything up by setting all the event
graphics back to blank and re-enabling the menu."

 

 

 

This is an intermediate tutorial. It requires knowing loops, conditional branches, and variables. It also requires strong knowledge of indexing.

 

There's two ways to make a menu. The first is with pictures. The second, less common one is using events. Both are fairly simple, but animating events is as simple as turning on their step animation.

 

If you're doing a menu specific to an event, like per the example, I recommend this system.

 

This is also a great system for teaching you the math to draw and index a menu grid! 

The red orb event can draw a grid using the necessary input. The 3 criteria are rows, distance, and columns. These are all we need to draw a grid.  From there you just plug them into formulas I show and get your results.

 

The example shows you how you can change your character with this system. It also contains an event that brings up a menu to save at, rest at, attack or visit with a tent.

 

The menus main downside is that other events with move routes still move when you're in the menu. It's rather negligible for this kind of menu though.

 

Give it a try!

 

49389967.png

 

92146444.png

Share this post


Link to post
Share on other sites

Just wanted to say thanks for an awesome tutorial! This has given me even more insight into events and allowed me to create my own character selection besides just showing choices and all that vanilla.

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×