Referencing Blueprints in C++
Author: Matthew Pacheco
As I worked on implementing two more turrets and a barricade, I began running into issues that couldn't be easily solved due to variables and functions being strictly in blueprint. One of the main issues I had to work around was being able to tell if the enemies were dead or alive for turrets to switch targets. I originally planned to use an IsValid() check, but since the enemy bodies stay behind, they do not become invalid. They did turn on a bool in blueprint that says they're dead, but since it wasn't tied into a C++ class that I could reference in my class with a case, I was unable to check it without making blueprints myself. This was basically the same issue with health components, as it was made in Blueprint as well and attached to the turret blueprints.
My fix for these issues was to create blueprints in Native events and implement whatever I needed in Blueprint. This required a lot more time than normal, but it worked as expected. Since I would like to keep my work in C++, I replaced this with less effective workarounds in C++. It did act as a proof of concept for when I am able to access these values in the base classes. As some of the defenses might apply effects, the issues will only become harder to work around, the longer term solution will be to work on migrating everything to C++ or at least creating a placeholder so I can properly shape my code around it. Then it can be ironed out once the C++ classes are fully implemented.
Posted on 11/03/2023
Get Cyber Siege
Cyber Siege
Third-to-First person Castle Defense game
Status | In development |
Author | TheCodeCollective |
Tags | 3D, First-Person, Futuristic, Robots, Singleplayer, Third-Person Shooter, Tower Defense, Unreal Engine |
More posts
- Visual Impact: Enhancing Player FeedbackFeb 03, 2024
- Revamping Reticles: Adding Specific DynamicsFeb 02, 2024
- Spider Enemy Dying in the AirFeb 01, 2024
- Small Changes: Beginning vs End of developmentJan 27, 2024
- Airstrike TimerJan 25, 2024
- Overcoming Code Mazes: Transitioning to Radial Progress Bars in Unreal EngineJan 20, 2024
- Airstrike Power-UpJan 18, 2024
- Resuming the Journey: Maintenance & PlanningJan 13, 2024
- Drone Enemy Particle Effect BugJan 11, 2024
Leave a comment
Log in with itch.io to leave a comment.