Firstly let me just say I am 100% brand spanken new to lua, wrapping my head around this is important to me so the more information I can get the better for me
I have a bolt of lightning and a trigger zone. I have added this script to the lightning to hide it.
-- DESCRIPTION: Plays <Sound0> when player enters the zone. Removes the zone afterwards so should be used to trigger an event or play a one-time-only sound.
g_lightningbolt = {}
function lightningbolt_init(e)
Hide(e)
end
function lightningbolt_main(e)
end
And I have this for the trigger zone
-- DESCRIPTION: Plays <Sound0> when player enters the zone. Removes the zone afterwards so should be used to trigger an event or play a one-time-only sound.
g_lightningtrigger = {}
function lightningtrigger_init(e)
end
function lightningtrigger(e)
if g_Entity[e]['lightningtrigger']==1 then
Show(e,lightningbolt)
Destroy(e)
PerformLogicConnections(e)
end
end
Now, the lightening seems to hide just fine (YAY!) but the trigger zone isn't showing the lightning at all (boo!)
So what am I missing? From what I can tell I am using the lightnintrigger to call the lightninbolt entity, but as it is not working I have obviously missed something.
Thanks in advance!
11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz 2.30 GHz, 32.0 GB, NVIDIA GeForce RTX 3060 Laptop GPU 6GB, Windows 10 Home 64bit, Screen resolution 1920 x 1080. System Passmark 3777