So, I’m working on a text based adventure thing, entirely in UMG.
Now, all my levels are basically functions. Each function contains the text for the “level” and the available options for the player. Whenever the player inputs the correct set of buzzwords, it goes to the next function (level).
In the event graph I have the Event Construct event, which runs my first level. I also have an OnTextCommitted event which sets the player input to a variable. The Action function scans the input and compares it to the available buzzwords inside each level.
Now, My problem is having the level “update” when I input the text. Right now, the level loads first, and if I input any text nothing happens. So I need something to help me fire the branches of the level after the Action function in the event graph has been fired. So I want to kinda jump from the end of one function to the middle of another function.
Can this be done? I know a little about event dispatchers, which seem to be the thing I need here, but I cannot get them to work. I cannot call custom events inside a function.
Or am I going about this the wrong way? Should I use macros instead? Or an entirely new widget for every level?
Any help will be appreciated. Thank you.