that is very weird, tested and confirmed also happens for me - after a little testing i found it's because of the
calls, adding a delay before they update didn't seem to help so i guess it's bug in the drowning code, looks like you'll have to do your own checking for player drowning for the time being if you want to continue to use those calls
as water is always the same height it's simple as adding
if g_PlayerPosY < 575 then
HurtPlayer(e,1)
end
inside the main code
like so
-- LUA Script - precede every function and global member with lowercase name of script + '_main'
local timeset = 0; local time1 = 0; local time2 = 0
--set value here to delay desired between each full cycle (in seconds)
--60 = 1 min ... / ... 120 = 2mins ... etc
local cycle_time = 60
--turn fog on/pff (1/0)
local fogon = 1
--set to 0 if you want to use a custom fog colour)
local fogcolouron = 1
--set to 0 if you want to use the ambiance slider (set to 1 for quicker darkness at night)
local ambi = 0
--set to 1 to start during the day, 0 to start at night
local daytime = 1
--time of day/night (0 = midnight / 100 = midday)
local change = 100
--set to 1 to display the prompt on screen
local optional_prompt = 0
--Time display Script by AuShadow
--24 Hour timer
-- Declare the local variable for time of day, can be made global if you want other scripts to work on time of day
local HourOfDay = 12
---------do not change below unless you understand :)
--how many seconds each hour should last
local Delay = cycle_time / 24
--cycle_time = (cycle_time / 60) * 1000
--Here is my timer variables
local TimeStamp1 = 0
local TimePassed1 = 0
local Time1 = 0
local Time2 = 0
local TimeStamp2 = 0
local TimePassed2 = 0
local Time3 = 0
local Time4 = 0
function day_night_main(e)
-- Check for time stamp, this is so timer resets after the set delay, and then stamp that time until timer delay is reached again
if TimeStamp2 == 0 then
Time3 = g_Time
TimeStamp2 = 1
end
--Constantly update Time2 and check difference from stamped time
--This is how we get how much time has passed
Time4 = g_Time;
TimePassed = (Time4 - Time3) * 0.001
--Note multiply by 0.001 is because g_Time is in milliseconds so 1000 to 1 second, this just turns it into seconds
--Check to see if time passed is equal to our set delay time and if it is then add 1 to hours and reset time stamp so timer resets
if TimePassed >= Delay then
HourOfDay = HourOfDay + 1;
TimeStamp2 = 0
--Check to see if we have reached 24 hours and if true then reset Hours to 0 and start again
if HourOfDay == 24 then
HourOfDay = 0
end
end
--This Prompt can be removed is just to demo that the time of day timer is working
Prompt ("time is " .. HourOfDay .. ".00 Hour".. change);
if TimeStamp1 == 0 then
Time1 = g_Time
TimeStamp1 = 1
end
--optional prompt to show speed of change in numbers
if optional_prompt == 1 then
Prompt(change) --optional prompt to show how quickly day/night is changing
end
Time2 = g_Time
TimePassed1 = (Time2 - Time1) * 0.001
if fogon == 1 then
SetFogNearest(change * 100)
SetFogDistance(change * 400)
end
if fogcolour == 1 then
SetFogRed(0)
SetFogGreen(0)
SetFogBlue(0)
end
if ambi == 1 then
SetAmbienceIntensity(change)
end
if g_PlayerPosY < 575 then
HurtPlayer(e,1)
end
SetAmbienceRed(change)
SetAmbienceGreen(change)
SetAmbienceBlue(change)
SetSurfaceRed(change)
SetSurfaceGreen(change)
SetSurfaceBlue(change)
if TimePassed1 >= 0.25 then
TimeStamp1 = 0
if daytime == 0 then
if change == 0 then
daytime = 1
else
change = change - 1
end
end
if daytime == 1 then
if change == 100 then
daytime = 0
else
change = change + 1
end
end
end
end
life's one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11