Skip to main content
Known Participant
April 2, 2013
Question

Dynamic Lightning?

  • April 2, 2013
  • 2 replies
  • 483 views

https://www.youtube.com/watch?v=mr7ANGZ9Nr0&list=PLOEJOE3LlMvwE36dEuoBEu5U8ld2BVO4f&index=1

The above is a youtube link to video of a tower defense game called "Tesla Defense". In the game, a Tesla death machine shoots electrical charges at minions.  The charges emanate from one spot and spread out along a length, dissipating at  different spots. I've been searching for a tutorial on how to do this, but haven't found anything.

I start with a movie clip of an electrical charge called "charge_mc". I set these paramemters:

charge_mc.x=12;

charge_mc.y=12;

Have tried a bunch of different things, but can't figure out how to assign a second position on the "charge_mc" movie clip. Any ideas on how to accomplish this?

This topic has been closed for replies.

2 replies

Inspiring
April 3, 2013

The effect is most likely using prerendered assets,done in After Effects with "Advanced Ligthning".

It can be dynamicly generated with a class like this, but that approach can impact the framerate depending on how much lightnings are present on stage.

In the first case you would probably render out three different sized LightningLoops and depending on the distance between LigthningOrigin and target choosing one of the three LightningLoops.

The spreading from one point to another would be done with a motion tweened mask reveal.

kglad
Community Expert
Community Expert
April 2, 2013

can you fix that link?