C++ basic help Modifying Triplex game

Hello. Just finished the Triple X tutorial and want to modify how the script works slightly.

In the void PrintIntroduction(int Difficulty) section just under the libraries, the final line reads:
“Level " << Difficulty << " code…”;

Instead of the level number being displayed, I want to set up a series of monster names that spawn instead of stating the difficulty level. I have a basic idea of how to do this but not sure how to introduce it to the code. Here’s what (I think) I want to do:

Create variables that reference the difficulty level i.e.:
If difficulty = 1 then << Monster1
If difficulty = 2 then << Monster 2
etc.

My issues are:

I think these would be string variables instead of Integers.
And, not sure of the placement of the if {} statement.
There’s probably a simpler way to achieve same goal, so suggestions welcome.

Let me know if I’m omitting anything or where to start with this. Thanks in advance!

I should note, this script is written in Visual Studio Code not in UE4

See this thread for help

Obviously you would want a different function name and values for the cases, everything else should be the same.

Thanks Dan!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms