Possiblity to controll game using commands?

Hey Guys,

I need your help here, I want to make a small game as a project for school where I have a character in a little space and on one side there should be a text field where the user can type ‘moveForward’, ‘do… while’ and so on.
Kind of a simple programming language in Unreal, it should be for children to learn the basics of programming. Is there, at best with blueprints but would be cool if not, an option to do such a thing?

Thanks in advance.


Of course, it would be pretty simple to do with blueprints

Thanks for your fast reply. I’ve been trying to do it the last couple of days, but I honestly don’t know how to start that, cause I would need a text field that can read the simple code like ‘moveForward’ and do an imput command for the character. But I don’t really know how to. Could you guys help me out how to start? :smiley:

Like Darth mentioned,

It should be fairly simple depending on how you set things up.

First, create the UMG widgets that will take the command - say a textbox for commands and a button for running the command.
Inside the UMG editor, click on the “On Release” event for your button (bottom right corner) to create an event that will fire when the button is released.
From this event you will then call another function / event inside your Character BP that will execute the command.


Text: “Jump”
Button Pressed -> Use a switch on string node to have actions for each possible command (this means no complex commands). Cast to CharacterBP and call function fnJump
fnJump -> Makes character jump by calling Jump node (see thirdperson template for how this is done).

This is a very simple setup, but it also limits you because you are not really “interpreting” the commands. Instead the user has to know the exact command to use.

Hopefully this puts you on the right track!