Blog Entry: Console Commands: The Duality of Code and Blueprint
Author: William DeMayo Date: 2/29/2024
Console Commands: The Duality of Code and Blueprint
Part 1 The Problem:
The problem that I am currently having is I have console commands set up in a custom c++ class and I have blueprint functions as well for certain console commands. The ones that I have set up in code I have given the UFUNCTION property of Exec meaning that it is a executable and can be called on runtime. This is where I run into my problem, the console commands the one specifically that I made in C++, I can see that the methods exist in the console window, however, when I call the method through the command console it can autofill, when you hit enter it leaves you with one phrase: command not recognized. With my blueprint functions I have three events set up for one console command; one that runs from a multicast, one that works on the server alone, and the base method to call. The base method to call will check if the person who typed the command in has authority to call the respective function.
Part 2 The Solution:
The way that I think I could solve this problem is by creating a scene component that is attached to the scene that can access every custom console command. With Unreal there is a lot of console commands prebuilt into the engine, over 6000 to be exact. You can create your own console commands to do things that may be exclusive to your game or your systems. I think the way I could solve the ones in code not working is by recreating the methods for my console commands that don’t work in the event graph there. If it is a scene component it can help with null checking to make sure that the checks I am doing don’t reference garbage memory. The replication might be a problem with the code methods that I have right now concurrently, however, because I can’t run them through the command line there is no way to test it. Blueprints are so helpful to every day life but there are certain things you have to do in code and others that you have to visual script. It looks like for unreal specifically use blueprint methods and custom events when you are creating custom console cheats.
Get Deadlands Duel: Time Rift Rumble
Deadlands Duel: Time Rift Rumble
A hot-blooded, feel good, zombie wave defense shooter.
Status | Prototype |
Authors | Willy Games, Ghost Of Reddus1, Mystic, LGUAPOJR, StevenCodes, Bjornoid, Johncarlos Lillo |
Genre | Shooter |
Tags | Arcade, Atmospheric, FPS, Horror, Multiplayer, rogue, Sci-fi, Unreal Engine, Zombies |
Languages | English |
More posts
- Perk System SetupMar 31, 2024
- Blog Entry Title: Morale and B featuresMar 29, 2024
- Class Ability ImplementationMar 29, 2024
- Blog Entry: RPG Explosive Projectile: Network Replication and Destruction bugMar 29, 2024
- Blog Entry: Powerup UIMar 29, 2024
- Spectating SystemMar 27, 2024
- Blog Entry Title: User Interface and Under hood with Unreal AudioMar 23, 2024
- Blog Post: The Miniboss ProjectileMar 23, 2024
- Unique but modular class abilitiesMar 23, 2024
- Blog Entry: Instant Kill PowerupMar 23, 2024
Comments
Log in with itch.io to leave a comment.
Console commands are great for debugging they have been invaluable
Bring it all together!!!