Jump to content
The Dark Mod Forums

Fading in player's view on spawn - how?


motorsep

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.

  • Recent Status Updates

    • 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.
      · 6 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
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...