-- LUA Script - precede every function and global member with lowercase name of script + '_main' local showtext = 1 local keyPressed = false local done = false local messages = { "Ouch, I'm glad I'm alive after that fall.", "It's dark, a flashlight would be nice to have.", "If I follow this canyon I might find a road." } function start_story1_init( e ) end function start_story1_main( e ) if GetPlayerDistance( e ) < 150 and showtext <= #messages then FreezePlayer() Panel ( 38, 46, 62, 54 ) TextColor ( 39, 50, 3, messages[ showtext ] , 255, 255, 255 ) Prompt("Press E to continue") if g_KeyPressE == 1 then if not keyPressed then showtext = showtext + 1 keyPressed = true end else keyPressed = false end elseif not done then if messages[ showtext ] == nil then UnFreezePlayer() done = true end end end