Art Blog |
Controller Input Widgets
Controller Input Widgets
In Unreal 4.6, one of the inputs that was not available for widget blueprints was controller input.
Because of this, I had to figure out a solution to get the game pad controller working with our menus.
What I ended up doing was creating a blueprint actor for every menu. The blueprint would enable player
input and trigger events within it, which would then trigger events in the widget blueprint. It had to
act as a link in order for the controller to be used with our menus.It was a simple solution for the problem
and was used for all the menus throughout the game along with the character selection screen.
Some notes on our kill tracking system:
- On player death, the opponent who was responsible for the death gets a point.
- There would be a chance that the announcer would comment on the death,
the comment would be special to the character the opponent was playing.
- If a player was able to kill more than one opponent at once, it was a multi-kill.
- There were special announcer lines for multi kills dependent on if it was a double kill or triple kill.
The game play of Battery Jam focuses on indirect combat. Other than the rare wormhole power up, there is no other
power up in the game that directly kills another player. Players can die by environment trap spawned in the
level, the wormhole (player power up), or by landing in lava tiles. This made things a little trickier.
Lava tiles were primarily the way players met their demise, by being either pushed or pulled into them.
For the system to work correctly, on death of a player I would have to figure out
what trap they were last in and who spawned the trap.
Adding points was simple enough. Whenever a player used a power up and placed a trap, the trap
would have memory of who spawned it. When another player overlapped the trap, it would set variables
in the player corresponding to the trap spawner, and the trap itself. If the player died, this information
would then be sent to the scoreboard and add points to the spawner of the trap.
For audio files, any multi kills would take precedence and would always be played first. A multi kill was determined
by a variable specific to each player in the score board that would clear every few seconds. If a player was able to kill
more than one person during that time, it counted as a multi kill. If not, there were be a percent chance that the announcer
would comment on the death so we wouldn't have the announcer speaking the whole time.
There had to be a way to queue up sound files as well so there weren't multiple sound files playing at the same time. This was
done in a custom macro that would play announcer comments one after another in the proper order.