Jump to content
The Dark Mod Forums

Fading in player's view on spawn - how?


motorsep
 Share

Recommended Posts

Some games fade in player's view (from black) on spawn. I assume it's done to prevent player seeing certain things being spawns and such. So there is a delay between being spawned and seeing the world.

 

I have a few things, particles in particular, that begin emitting at t he same time player is spawned. It doesn't look appropriate as I'd like for particles to be at full capacity when player is spawned. So I figured if I have a delay and the gradual fade in from black on the view, then the issue would be resolved.

 

Is it something engine/game already provides (Doom 3) ? How can I achieve such effect ? Thanks.

Link to comment
Share on other sites

If it can be done without scripting, I'd guess at something involving a couple of http://wiki.thedarkmod.com/index.php?title=Triggers#trigger_fade (one with a very quick fade to keep the screen black initially), with the setup targetted by worldspawn.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

TDM runs 10 frames before the player gets to click the attack button to start, iirc. I'm not sure how that was achieved off hand but I've seen it in the code. So you could copy that. Or script it, there's a "Fade" script event for that purpose I think, which is probably how the triggers work too.

Link to comment
Share on other sites

Thanks, but what do you mean by that ^^ ?

 

Worldspawn triggers its target (I think it can have only one target) on mission start; you give it a target by selecting any worldspawn brush and giving it a target spawnarg as you would an entity. For example, in the map I'm making I have it pointing at a trigger_relay, which waits a moment and then triggers an atdm:gui_message to put a message on the screen at the start of the mission.

 

Edit: http://wiki.thedarkmod.com/index.php?title=Triggers#Triggering_via_Worldspawn

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Worldspawn triggers its target (I think it can have only one target) on mission start; you give it a target by selecting any worldspawn brush and giving it a target spawnarg as you would an entity. For example, in the map I'm making I have it pointing at a trigger_relay, which waits a moment and then triggers an atdm:gui_message to put a message on the screen at the start of the mission.

 

Edit: http://wiki.thedarkm..._via_Worldspawn

 

Just for the record: Such simple things like "wait a bit and then trigger a message" are literally 2 lines in the scripting code. No need for the trigger_relay and so on :) But I guess we really need a tutorial for scripting :)

 

And I think worldspawn can have many target spawnargs, if not, that would be a bug :)

 

Edit: And I forgot to mention, atdm:gui_message does support "auto_trigger" "1" and "delay" "2" and it would put up the message 2s after mission start. If that doesn't work as such, then that would also be a bug. "auto_trigger" is even documented, but "delay" not.

Edited by Tels

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Just for the record: Such simple things like "wait a bit and then trigger a message" are literally 2 lines in the scripting code. No need for the trigger_relay and so on :)

 

It's a matter of taste; since this map doesn't have an init script already, it was simpler for me to drop a couple of entities into DR.

 

And I think worldspawn can have many target spawnargs, if not, that would be a bug :)

 

It's what's claimed in the wiki page I linked; for all I know it may be out of date.

 

And I forgot to mention, atdm:gui_message does support "auto_trigger" "1" and "delay" "2" and it would put up the message 2s after mission start. If that doesn't work as such, then that would also be a bug. "auto_trigger" is even documented, but "delay" not.

 

I tried "delay" on the message entity initially and as far as I remember, no, it didn't work. (Also, I may later want to set up other things on mission start, in which case having them all triggered through the same relay would help keep things organised.)

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

It's a matter of taste; since this map doesn't have an init script already, it was simpler for me to drop a couple of entities into DR.

 

Sure, but for me often scripting is easier :)

 

I tried "delay" on the message entity initially and as far as I remember, no, it didn't work. (Also, I may later want to set up other things on mission start, in which case having them all triggered through the same relay would help keep things organised.)

 

You need "auto_trigger", too. The spawnargs are generally documented on the entities, so you can look them up in DR. The wiki page is probably not uptodate.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

You need "auto_trigger", too.

 

I had it targetted by worldspawn; are you saying "delay" is inert when the message entity is triggered by something else in the map?

 

Checking in DR, the description for "delay" on a message entity is

 

Initial delay in milliseconds. (wait time before the first event happens).

 

whereas "delay" on a trigger_relay is

 

seconds to wait before firing after triggered.

 

but I can't tell from that wording whether "delay" on a message entity is supposed to be inert when the entity is triggered by something else.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

It is supposed to work like that:

 

* triggering happens (or "auto_trigger" is "1" and the entity spawns

* "delay" seconds pass

* the message appears

 

So, if you put "delay" on the message entity and targeted it from worldspawn (or from a relay or a trigger), that is supposed to show the message after X seconds after the triggering.

 

Likewise, if you target the entity not at all,but put "auto_trigger" "1" on it and delay "2", the message is supposed to show after 2 seconds.

 

Does that make it clearer? The "delay" spawnarg in TDM entities usually applies to "x seconds delay after trigger event the action starts".

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Right, so I'm not supposed to need auto_trigger if I've another trigger set up.

 

However, a quick check in a test map suggests that the "delay" and "auto_trigger" combination works as expected, and so does my setup with a trigger_relay, but targetting the message entity from worldspawn produced no message at all, with or without a delay.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

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.

 Share

  • Recent Status Updates

    • duzenko

      Please, can we finally group the missions by year in the game menu?
      · 6 replies
    • duzenko

      I vaguely recall someone recently complained about two-sided materials (curtains?) not getting lighting from both sides
      I just found a piece of code that's supposed to do just that
      Where was that discussed? (@nbohr1more?)
      · 9 replies
    • Xolvix

      I still play classic Doom (albeit with user-made mods and maps rather than the original campaign) on a regular basis. A game from the early 90's which has still got a healthy following in 2022. Pretty amazing.
      · 3 replies
    • Nort

      I'm beginning to understand why people who aren't into social clubbing "don't last long" on this project, and why it's so full of holes. When moderators are siding with bullies, by closing down threads that they derail, then I start to wonder if I should support the platform to begin with.
      I'm sure that the core development is solid, but when you're constantly tone policed and bullied, and moderators are playing into it too, then the project will just drive away talent, and replace it with socialites instead. ...and without talent, you only end up with a small skeleton crew trying to do everything themselves.
      ...so Dragofer and Airship Ballet, and all you other socialites, you win. From now on I'll just keep to myself. You'll never be able to do my work, but at least you'll be happy together, and that's what matters to you.
       
      Update
      Actually, I have to revise my statement:
      I actually messaged greebo - the top dog, I gather - about nbohr1more's outburst of insanity below, and since I haven't even heard back from him, I just have to assume that there's not a single core programmer here, who's not backing nbohr's threats. ...and that's bad.
      ...so if you're a newbie reading this, or an honest soul like ZergRush, then just slowly back out of these forums, run, and don't look back. This is nothing more than a cult posing as a game development project, using Thief and IDTech4 to sucker hopefuls in, to do work for them, while trying to cajole them into something going on behind the scenes, which apparently - according to nbohr - is something that should be hidden from the state. These people aren't programmers - they don't even understand things like how to fix the simplest bugs. All they have, is an engine, and an IP, and some sort of fascist social cult. There was some other project I saw being made in the Unreal Engine. Try joining that project. ...or start a project of your own. Anything but this asylum.
      Hopefully that was "divisive" enough for a final post, because at this point I really want people to leave this place. This project is, on a management level, just awful garbage, run by garbage people, apparently from the top down, and I'm just glad that they have a garbage place to stay, together, and hopefully forever.
      Nort
      · 16 replies
    • The Black Arrow  »  Araneidae

      A spidey! I love spideys 🕷️
      · 0 replies
×
×
  • Create New...