-- story intro script for shakyshawn8151 by AuShadow local basetut = 0 local pressed = 0 function basetut1_init(e) end function basetut_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; basetut = basetut + 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 basetut == 0 then Prompt ("Find the stores before you freeze to death, Press E to continue."); end if basetut == 1 then Prompt ("The Stores contain your deployable field Base kit."); end if basetut == 2 then Prompt ("You wont survive long, Unless you find it quickly."); end if basetut == 3 then Prompt ("You can deploy this Base anywhere and take it with you."); end if basetut == 4 then Prompt ("Without it you will die of hypothermia in minutes."); end if basetut == 5 then Prompt ("Good luck Soldier."); end -- end distance check end -- and end function end