here ya go
(and anyone else that would like to use it---feel free )
-- LUA Script - precede every function and global member with lowercase name of script + _main'
-- you can use this tiny script to control the darkness of the level when the
-- player takes damage....you can vary the level .
-- to use it , just place a trigger marker under the area where the player
-- will start the game and add the damagelightlevel.lua file to the trigger.
-- if we need more info or other variation of this,,,experiment or ask me.
-- I'm NOT very good at this...but i try....jajajaajaj
function damagelightlevel_init(e)
end
function damagelightlevel_main(e)
SetGamePlayerControlRedDeathFog(0)
SetGamePlayerControlHeartbeatTimeStamp(-1)
if g_PlayerHealth == 80 then
SetBrightness(-.1) -- working levels are from (-.5 )very dark to (.5) very bright
elseif g_PlayerHealth == 60 then
SetBrightness(-.2) -- working levels are from (-.5 )very dark to (.5) very bright
elseif g_PlayerHealth == 40 then
SetBrightness(-.4) -- working levels are from (-.5 )very dark to (.5) very bright
elseif g_PlayerHealth == 20 then
SetBrightness(-.5) -- working levels are from (-.5 )very dark to (.5) very bright
elseif g_PlayerHealth == 0 then
SetBrightness(0) -- working levels are from (-.5 )very dark to (.5) very bright
end
end
if you want the heartbeat back in,,,just set it to
(1) so active
(0) or
(-1) both seem to work for deactivating the heartbeat sound ( except one beat at the death scene )
you just had too many
end commands
and you were not allowing choices by not using
ifelse commands was all.
this should do ,as you want now,,let me know,.
P.S. later on if you'd like to try this with colors , I also have
a script worked up that can do that. it works with a script I wrote a while back
that sets up your start level lighting as you want it at the start of a level.
Thx
UNIRD12B
Let\'s actually make something happen with this one !