Creating a hacking mechanic in a game

I am trying to allow the player to hack into computers n my game by making them input information with the get input script. This is my code.
msg ("") msg ("Welcome, please enter you're IRIS ID and password, if you forgot your ID or pasword please type and we will take you to the account recovery screen.") msg ("") msg ("IRIS ID: ____________") msg ("") msg ("Password: _______") msg ("") msg ("Input ID and Password with a comma seperating them, like below.") msg ("") msg ("User, 1212") msg ("") get input { if (result=reset) { msg ("Please complete the following word.") msg ("") msg ("co_r_p__d") msg ("") get input { if (result=corrupted) { msg ("This is your IRIS ID: I__SU_s_r1539") msg ("") msg ("This is you're Password: I_I_1140") } else { msg ("Incorrect") } } } else if (result=IRISUser1539, IRIS1140) { } else { msg ("ERROR: Input not accepted") } }


if (result=corrupted)

This compares the contents of the variable result (what the player typed) to the contents of the variable corrupted (which doesn't exist).

You probably want:

if (result="corrupted")

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums