Hi,
I would use a block as below, with a basic "if then" structure, with a timer delay to control the steps.
So in the init(e) you would give delay a value so you can compare it to the timer value.
ie: delay = 100
-- fade into darkness ie: -1
if g_Entity[e]['plrinzone'] == 1 then
if GetTimer(e) > delay then
if dark >= -1 then
dark = dark - 0.01
SetBrightness(dark)
end
StartTimer(e)
end
end
Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz, ~3.6GHz, Windows 10, 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768.
Operating System: Windows 10 Home 64-bit (10.0, Build 15063) (15063.rs2_release.170317-1834)
PT V9.0 3DMark=4344, Passmark=3291.
Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
PT V9.0 3DMark=377, Passmark=1222.