Website powered by

How did I handle… Implementing an Interface for Video Game Using C++ for Unreal Engine API

The solution I'm developing here consists of first making a prototype of the interface in Blueprints (I'm working in Unreal Engine) and, once it's functional, translating and reorganizing the tasks in C++ using Visual Studio. The image is showing the Blueprints prototype for the main interaction. The Blueprint consists of a sequence of 4 methods triggered by the interface when pressing the “E” key:
• Updating the counter
• Destroying the collected Actor
• Checking out whether all items in the level are collected and, if that's the case
• Unlocking the exit gates.
These are the tasks I'm executing to implement these methods in C++:
• Writing the interface header
• Mapping the interface to “E” key
• Creating an additional capsule
• Writing methods for overlapping
• Setting up a variable for the pickups
• Implementing overlapping in constructor
• The “E” key function, and
• Writing a link to the interface on the pickup node
You can find more programming samples in the following articles:
Programming Interaction: https://www.3dartviz.com/skills/skills-tech/programming-video-game-interaction-cpp.html
Delegates for UI & Gameplay: https://www.3dartviz.com/skills/skills-tech/delegates-communicate-ui-gameplay.html
Adding Input Action in C++: https://www.3dartviz.com/skills/skills-tech/adding-input-action-cpp-ue.html
Programming Gameplay in C++: https://www.3dartviz.com/skills/skills-tech/programming-gameplay-cpp-ue.html

Blueprints prototype for the interface with a sequence of all methods activating when pressing “E” key.

Blueprints prototype for the interface with a sequence of all methods activating when pressing “E” key.