Terminal Hacker - Starting a new game

Hello,

I’m trying to create a game with a linear story using the knowledge learned in the Terminal Hacker class.

I would like to understand how I can apply OnUserInput to different screens, for example:

Menu> type Start> Screen 1

Screen 1> type something> screen 2

I tried to use OnUserInput but it only applies to the home screen.

Thank you!

Hi Rodrigo,

Implement a switch or if-statements in the OnUserInput method. Depending on the current value of screen, execute a specific code block. If screen == Screen.Screen1, then execute the code block and set screen = Screen.Screen2. When the player types something, screen == Screen.Screen2 would be true.

If you find this too confusing, complete the Terminal Hacker section because everything you need is already in the final game. You will just have to use the techniques you learnt to implement your own idea.


See also:

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

Privacy & Terms