The Attack Buttons
There is no Java equivalent for the Button blueprint as the Java edition is all text based and relied on the user typing in a command over a mouse click.
Event Begin Play
This long list of nodes was the event begin play for the button before I broke it into pieces.
This is better and still accomplishes the same task. It looks cleaner and is easier to read.
Set All Visibility Off
Sets the visibility for all meshes and effects to false. This keeps them from appearing instantly when they are spawned.
Set Materials
Creates the Dynamic Material Instances required then sets the active material to black. The instances will allow for the hover material changes.
Materialize and DeMaterialize Button
These events do as they are named, materialize and dematerialize the buttons. A sound effect is played, followed by changing to a dynamic material instance which has a special scalar parameter to 'materialize' meshes. Once the mesh is fully visible, the material is set back to a standard color. This keeps the texture complexity down when the effect is not in use. Dematerialize does everything in reverse then destroys the actor.
Materialize VFX material provided by W3 Studios. All button sound effects provided by Sidearm Studios.
Throw Projectile
A projectiles get thrown by the player and the AI. The player activates it by clicking on the button. The event starts by activating the sound effects and changing visibilities of the projectile meshes. The projectile and the fx flash have their locations set and a 'Move Component To' function is used to send the projectile across the board. It all ends with a custom end event.
Projectile Helper Events
There are three helper events for the 'Throw Projectile' event. Two to play the sound and one to end the projectile at its final destination.
Change Material Events
The above events are simple events to set the material for the button and are used by the button's hover state machine.
Hover Events
When hovering over the button with the mouse cursor, a sound gets played and an instance of the hover state machine is started. The state machine uses the 'Hovering?' boolean to move through the states. This is another example of events that do not necessarily require a state machine to function, but worked better in testing.
Click Event
Clicking on the button plays a sound to start. In a future version, this sound will get moved to the state machine because it plays whether you click on your button or one of the AI's buttons. The same goes for the hover sound, it will get moved to the state machine. A dispatcher is called on click which is bound inside the level blueprint. Then the a very simple state machine is started to handle firing off the remaining events.