couldn't help myself, i've written the script and tested on my laptop so here u go, but i would try yourself using the hints above before looking at this one, and also in my testing i found it better to declare your variables before the _init function. anyway hope all this helps
-- story intro script for shakyshawn8151 by AuShadow
local tut1 = 0
local pressed = 0
function tutorial_init(e)
end
function tutorial_main(e)
PlayerDX = g_Entity[e]['x'] - g_PlayerPosX;
PlayerDY = g_Entity[e]['y'] - g_PlayerPosY;
PlayerDZ = g_Entity[e]['z'] - g_PlayerPosZ;
PlayerDist = math.sqrt(math.abs(PlayerDX*PlayerDX)+math.abs(PlayerDY*PlayerDY)+math.abs(PlayerDZ*PlayerDZ));
-- All the code is inside the distance check
if PlayerDist < 3000 then
if pressed == 0 and g_KeyPressE == 1 then
pressed = 1;
tut1 = tut1 + 1;
end
-- Make sure user has to release the E key before it can add 1 to tut1 again
if g_KeyPressE == 0 then
pressed = 0
end
if tut1 == 0 then
Prompt ("Welcome to Dead of Night, Press E to continue.");
end
if tut1 == 1 then
Prompt ("The E Key is your main button. Press it.");
end
if tut1 == 2 then
Prompt ("It's 2015 and the world is in ruin.");
end
if tut1 == 3 then
Prompt ("You wont survive long, Unless you Learn to adapt.");
end
if tut1 == 4 then
Prompt ("Looting,Cooking,Gathering and,Farming.");
end
if tut1 == 5 then
Prompt ("Those are some of the skills needed to survive.");
end
if tut1 == 6 then
Prompt ("You are on your own now. Go live your life.");
end
-- end distance check
end
-- and end function
end
oh and the Prompt is in there just seems to be white, lol u can see it if you highlight it
also added the working .lua file as an attatchment
edit also feel free to use my hunger and thirst script if you want that in there aswell