It looks like you're new here. If you want to get involved, click one of these buttons!
TL;DR I want to make an RPG Battle System that has attacks that allow the player to select specific bones on an object. The system I've created is riddled with bugs and I'd like to know how more experienced gamedev would tackle this problem.
Hello, Pyxtess here!
I'm in the process of creating a Battle System for my game, but I'm having some issues with the menus themselves. My vision for the system can be summed up as follows:
-Start off with a "main menu" that has a list of the attack the player can use
-Some attacks are basic and only require the user to click their respective button, while other attacks need to be explicitly directed towards a point on the enemy (Like the VATS system in 3d Fallout games) So when the player selects this attack on the main menu, the UI changes to allow the player to select an area on the enemy.
-Once the player selects an area, a sub menu will appear and give the player specific commands
I was able to create the main menu and the sub menu by using button, as well as, create the VATS-esque select system through script; though the issue is linking the two together. So from people who are more experienced in Unity than I am, I would like to know how you would approach this problem? Right now, I feel my solution is just.... Spaghetti code, so any advice towards tackling this would be appreciated. (─‿‿─;;)
For extra clarity on what I have so far:
-My "VATS" System: It basically takes an array, that holds all the bones of an object, and calls that specific bone when needed. The visual indicator is set to the position of the selected bone and is updated whenever another bone in the array is selected. The player can change what is selected through WASD.
-Menus: They are just basic buttons that call functions when pressed. The only code that is on them is an index system which makes the first button automatically selected when they are active (allowing the player to select other buttons through WASD)
-Pressed VATS-esque Attacks: A function is called on press that deactivates the menu and sets a boolean to true. This boolean is located in the VATS-esque system's update function which, when true, allows it to be controlled via WASD.