Skip to main content

Report this content

We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.

Note that misuse of the reporting tool will not be tolerated.

Item being reported:

A forum post by FlashMedallion

This could be pretty in-depth, and I'm pretty much going to make this up as I go. I'm going to assume your lighting is coming out of the sky, and for the sake of simplicity is one really long zag.

I'd start by creating an object in the sky that uses a laserscope to find a target.

Firstly you need your game to know what is Metal and what isn't. The simple way is to run around and slap a tag named 'Metal' on everything that you say is metal. A more robust way might be be to designate the surface type of all your metal things as Metal (that's a built-in option) and use your laser to report the surface type and figure that into your logic (I *think* that's possible but haven't checked for a while).

Lets say you're using tags though. You want your laser (just one for now) to find a tag named Metal. Maybe it looks for the closest (i.e. the highest/tallest object) or maybe it's a random one.

Then when it's lightning time (however you're deciding that) then you simply emit your lighting bolt at the location of the tag (with the bottom of the bolt at the tag). The bolt itself will have it's own timeline attached to it that activates when it's emitted - maybe it glows very bright for a split second, plays a sound, emits a new object (the Sparks you've made) then destroys itself.

Oh dear! Your browser is either unsupported or there has been a problem loading the page.