Lightning Strike

Ask questions, discuss ideas, get answers
Post Reply
User avatar
Jimi Hendrix
Posts: 11
Joined: Sun Sep 12, 2010 4:53 am

Lightning Strike

Post by Jimi Hendrix »

I am currently working on a halloween map for kicks with a dark theme.....(more details soon..)

What i am envisioning is a night map with realistic "Lightning Strikes" and a burning fire burst at the point of impact.

Is this possible? Would it need to be an object?



JH
8-)
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Lightning Strike

Post by fo0k »

Apache has done a bit of this.. what would look quite nice and random would be a rocket object, fired from above with a slightly offset firing position so that it would change direction slightly on the way down (maybe a couple of changes).. it would all happen in a split second but leave a nice sharp white trail behind it to give the lightning effect.. then the fireball on ground bit would be just a nice effect tweak on impact and would always be in the right spot...
User avatar
Jimi Hendrix
Posts: 11
Joined: Sun Sep 12, 2010 4:53 am

Re: Lightning Strike

Post by Jimi Hendrix »

Well, after some more research....

Image
Pixel-Fighters FH map: "Pripjet_Swamps"

This map contains;

Objects:
- e_rainview
- Lightning
- LightningFX
- Rain_object

This is a Forgotten Hope custom map, so what im wanting to do this map seems to do it.
Very effective lighting flashes with thunder, however there'no Lightning Strikes like what i mentioned above. The sky will flash and then you hear thunder.

Now, if only the great Apache would lay a little knowledge on me.......

8-)
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Lightning Strike

Post by Apache Thunder »

I have made a lightning strike effect by making a long narrow mesh with BF2's lightning texture on it. I then coded it to spawn in random places on the map at different angles. This was something I added to a night conversion of Victory Village in my BFHeroes'42 mod. So that part you should be able to achieve.

However I had attempted to have a sound effect tied to each lightning strike, but as of yet, haven't found away (using particles anyway). Sound scripts can't be tied to particle objects it seems. I could have the effect spawn a simpleobect/bundle instead, but I would lose the fading/size change effects associated with using a particle. So I still used particles.


As for the burning effect on the ground.....That would require that you rework completely how the effect works. Because your terrain will have hills and other changes in altitude, so having the effect spawn the burning effect/other effect on impact will be ineffective unless your map is completely flat and all one level. The move to water command for emitters only works for water. There is none for moving to the terrain. (which would have made this possible. :( )

You can try spawning lightning as PCOs via spawners at specific heights. But you would have to put quite a bit of them on the map for it to look realistic and not too artificial.

Oh also, if you want the lightning strike to actually harm soldiers on the ground you could make the lightning an obstacle object with a high damage value. (having it spawn as destroyed and with short timeToLiveAfter death so the lightning doesn't last long) That could be one way of achieving that. Though just as in real life, if you have an effective emitter for it that spawns it over a wide area randomly, the chances a player gets hit by one directly are just as slim as in real life. :P
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Lightning Strike

Post by Swaffy »

Holy crap, that sounds awesome. I never thought about having actual lightning strikes on a map. I'm surprised EA never used the game engine to it's capacity. In fact, EA barely scratched the surface on this game engine. Sure, the physics are a bit odd, but it's amazing what people come up with regarding the game engine.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply