nightbringer,
If you want to use collision on the fire decal then you will have to modify its fpe settings, edit it in notepad like a script.
change
collisionmode = 11 from, to collisionmode = 0
the fpe is located "C:\Program Files (x86)\Steam\steamapps\common\Game Guru\Files\entitybank\Decals\Fire 1.fpe", if this is the decal you used..
I modified your code, so the player will not die straight away when he gets within range.
This script goes into the fire decal, and has to be named fire.lua
in your screenshot you have Feuer.lua attached to the decal, that wont work as the names need to match, and only use lowercase lettering for scripts and function names.
This script needs to be named fire.lua
-- Fire - If you touch it, you get hurt
local delay = {}
function fire_init(e)
delay[e] = 2000 -- you can adjust this time value to speedup or slowdown the rate that the player gets hurt
StartTimer(e)
end
function fire_main(e)
-- CollisionOn(e) -- you will have to adjust collionmode in its fpe for this to work. It will have collision on, by default then. Then CollisionOff and CollisionOn will work.
PlayerDist = GetPlayerDistance(e)
-- added a timer delay, otherwise the player will die straight away on the first touch.
if PlayerDist < 80 and GetTimer(e) > delay[e] then
HurtPlayer(e,10)
StartTimer(e)
end
end
Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
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)