Jump to content
The Dark Mod Forums

Thunder and lightning: customizing


Bikerdude

Recommended Posts

Afternoon

 

Helping Xarg with his map and he would like to have thunder and lightening in his map, but we have run into the following issues -

 

1. how do we have the lightning flash in the sealed off parts of the map, do we use more than one thunder_fx entitny and if so then how do we make it so we only have set of thunder and lightening.

2. how do we change the position of the thunder_fx entity depending on difficutly, eg on easy it would be inside the skybox and not ullumination the streets..

Link to comment
Share on other sites

1) Try using a trigger_relay targeted to all the entities associated with the lightning. When you want to fire off the lightning, activate the trigger_relay.

 

2) You should be able to hide/show entities based on difficulty with the following keys set to 1. I haven't tried this in TDM but I assume it still works.

 

not_easy

not_medium

not_hard

Link to comment
Share on other sites

Thanks for that Rib, but the issue is the entity that does the thunder/lightening is one and the same, I dont think I have have more than one of it otherwise I would have two sets of thunder/lightening in the same map which would be odd.

 

The only way I can think to use your method is its possible to have separate entities.

Link to comment
Share on other sites

Okay I see what's going on now. The "lightning" is comprised of a trigger_timer and two func_fx entities. Upon examining the fx declarations I can only assume one was intended to remain in the skybox (fx/thunder_skylight.fx) and the other was intended to be moved into the playable area of your map (fx/thunder.fx).

 

Depending on the layout of your map, you may need to make copies of this second func_fx and connect it to the trigger_timer in order to illuminate all the necessary areas. The lights are plenty big enough to cover an entire map but they are also shadow casting which means the light will not bleed through walls.

 

You might want to consult the author of the prefab or see if anyone has used it before. I'm concerned about duplicating the func_fx because with lights that size overlap is unavoidable and that could wreck performance.

Link to comment
Share on other sites

Depending on the layout of your map, you may need to make copies of this second func_fx and connect it to the trigger_timer in order to illuminate all the necessary areas. The lights are plenty big enough to cover an entire map but they are also shadow casting which means the light will not bleed through walls.

 

You might want to consult the author of the prefab or see if anyone has used it before. I'm concerned about duplicating the func_fx because with lights that size overlap is unavoidable and that could wreck performance.

In this instance its Xargs map, and it has two sections so the single func_fx generates both thunder and lightening. The thunder can be heard everywhere but the lightening can only been seen in the section the func_fx is in. if I have a func_fx in both sections I assume then I am going to get two sets of thunder and lightening, and thats where the problem lies there in.

Link to comment
Share on other sites

There is a wiki article: http://wiki.thedarkm...title=Lightning

 

If you want multiple flash sites, use more than one thunder.fx. Let the trigger timer target the fx's.

 

This is just one way to set it up. If the lights are shadow casting then yes they are performance heavy. Instead you can use a non-shadow casting light or perhaps one with a projection texture.

Link to comment
Share on other sites

This is just one way to set it up. If the lights are shadow casting then yes they are performance heavy. Instead you can use a non-shadow casting light or perhaps one with a projection texture.

 

non-shadow would shine through everything, which would be a non starter...but will try the twin fx entities and see how I get on.

Link to comment
Share on other sites

Here's the thunder fx declaration minus the sound...

 

fx fx/thunder_nosound
{
   {    //creates light
       delay 0
       name "thunderlight1"
       duration 0.4
       restart 0
       light "lights/biground1", 0.35, 0.35, 0.7, 999999
   }

   {    //removes light
       delay 0.4
       name "thunderlight1off"
       duration 0.3
       restart 0
       uselight "thunderlight1"
       fadeOut 0.05
   }

   {    //creates light
       delay 0.3
       name "thunderlight2"
       duration 0.4
       restart 0
       light "lights/biground1", 0.35, 0.35, 0.7, 999999
   }

   {    //removes light
       delay 0.4
       name "thunderlight2off"
       duration 2.5
       restart 0
       uselight "thunderlight2"
       fadeOut 0.05
   }
}

 

Save this text to a text file. Rename it something unique like xarg.fx. Create an fx folder within the working directory for the mission and place the file there. Create a new func_fx in the map and link it to fx/thunder_nosound.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...