Author Topic: Something that detects if a player is touching any light  (Read 493 times)

I have wanted this to be made since S&S were introduced.

Just think of a minigame where there's a building where almost all power is out. All lights are off - player flashlights (player light) and sunlight coming trough windows is the only light you can see.
And there's a monster in the shadows somewhere which is hurt a lot when it's in light.

A team of soldiers are put in this building to take care of the monster and save the city (something like that)

The add-on could be some kind of 'minigame event' which would be applied to a minigame.
onPlayerInLight > setHealth > [-20]
or something like that would work.
(though I think slayer has a feature like this)

I'm sure this could be done with ease using zones that are spawned around every light object based on its radius; the hardcoded light limit in blockland makes this kind of okay, and light coming from the sun would be done through raycasts fired at every player from the sun location


Would it lag any?
Shouldn't

Zones don't render unless under the effects of the mission editor, so its just an invisible object in the world

He doesn't just want them on point lights, he wants them on sunlight too

He doesn't just want them on point lights, he wants them on sunlight too

Calculate sun vector and use raycasts?