top of page
Search

VR/Mobile Game Development - Menu Popup

  • Writer: Conor Currie
    Conor Currie
  • Jan 11, 2023
  • 1 min read

When conveying information to the player, we decided that this would be through a textbox Popup on the Player's wrist. For handiness, we duplicated the textbox class that was used for the Pause Menu, and removed the ticks.


To have this menu function, I had three bindings on the cost menu, what the "Text" should be, what the "Cost" is and the Player's current score, all casting from the Widget to the Player through a bind.


ree

ree

Then, when I wanted a buyable object to have it's price displayed, I first had a trigger box check if the player had entered the box. Then, I cast to the player, and call the function, Toggle Textbox.


ree

The toggle textbox function is modified so it only ever spawns one textbox, and doesn't keep spawning textboxes. This is through a branch making it so the Textbox count never being allowed to exceed the number 1. Then, I call the new Menu Class that calls the Textbox.


ree

Then, to have the text display, I have the binding of "WeaponCost" be determined by the Integer present in the Blueprint that's linked to the Cost of the weapon, and the "CostText" be a Text Variable along the lines of "Purchase This For".


ree

Then, I call "Close Textbox", which just calls the Close Menu function.

ree

Finally, it displays when the player is near the buyable item, along with the text.

ree


 
 
 

Comments


Post: Blog2_Post

©2021 by Conor's swag. Proudly created with Wix.com

bottom of page