Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

The sound is looped. I guess the engine plays the sound to the end and only than checks whether the entity emitting the sound is still present. You could turn off the sound manually by adding the following command line in front of the command that removes the light:

 

lightEntity.fadeSound(SND_CHANNEL_ANY,0,0.01); 
//lightEntity is the light, fade all sounds on this entity to zero volume over 0.01 seconds
Alternatevely you could try

lightEntity.stopSound(SND_CHANNEL_ANY,0);

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Does the light have a sound shader spawnarg? If the sound is done that way then it's not spawning speakers. The console command you need to check is countEntities.

 

Another tactic that I think might work is to use the fadeToLight script event to set the light to 0 0 0 instead of turning it off, and turn it on again the same way. I seem to remember that that's the one way to turn off a light without triggering the rest of the stuff that happens when a light goes on or off.

Link to comment
Share on other sites

I am thinking of attaching some armor to a guard.

 

I just couldn't find details about it anywhere. There is something in the Wiki about binding things, and I found one very old thread (8 years or something) on it saying thats the only way it can be done, so I just wanted to know if thats still state of the art,

 

Or can I switch pauldrons with some "def_attach" or the like?

Otherwise, could I remove existing pauldrons? Or would I have to chose a model without pauldrons to attach the ones in "entity - darkmod . props - wearables"?

Link to comment
Share on other sites

 

Or can I switch pauldrons with some "def_attach" or the like?

Otherwise, could I remove existing pauldrons? Or would I have to chose a model without pauldrons to attach the ones in "entity - darkmod . props - wearables"?

 

 

The easiest way is probably to use existing pauldrons that are already set up with def_attach values. If you look in props_wearables.def, (I think that's the one) you should find some examples. I can't quite remember what the name of the attachment point is for them, but if you check out the def file for the builder guards you'll see an example.

  • Like 1
Link to comment
Share on other sites

To follow Moonbo's sound question, I have a sound question of my own. Is it possible to have different ambient sound shaders dynamically switch back and forth depending on if the player is seen or not? For instance, I'd like to have one 'calm' ambient sound playing while the player is sneaking around, and then once he's caught to switch to a similar but more tense ambient, which would then switch back to the 'calm' ambient when the guards have calmed down.

Edited by Morat
Link to comment
Share on other sites

Hey Morat,

 

You couldn't do that with the standard ambient music system. By default the ambient music system works by dividing the map into locations and then picking an ambient track for each location. When you switch between locations, the ambient music changes. You can change the ambient track in a given location during playtime however the change won't register until the player leaves and then re-enters the location (i.e. if Track A is playing in a location and you switch it to Track B, the player will keep hearing Track A until he moves to a different location and then back to the first location, at which point he'll start hearing Track B ). Since you can't change ambient tracks in real time (without an overhaul of the location system) what you're planning wouldn't work.

 

I'm sure there are plenty of workarounds though. For example, you could just have a set of global speakers that are triggered based on AI alert levels.

Edited by Moonbo

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

Yes, you'd do it just by a simple script that gets the AI alert states (the function was recently given around here) and activates a speaker if any are over a threshold, and then use some boolean toggle to keep it from perpetually retriggering until it's reset however you want, and turn the speaker off when the alert is back down a few seconds.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

You don't need a speaker at all, as you can play the sound "on teh player" directly. Check the locations system script (the scripts are in tdm_base.pk4 iirc) to see how it works.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

The easiest way is probably to use existing pauldrons that are already set up with def_attach values. If you look in props_wearables.def, (I think that's the one) you should find some examples. I can't quite remember what the name of the attachment point is for them, but if you check out the def file for the builder guards you'll see an example.

Thanks, that works wonderful for people that already have pauldrons attached this way, and people without pauldrons to begin with.

Not for guards with paulsdrons worked in the model already, but thats okay, there are quite a few others to work with.

Link to comment
Share on other sites

You don't need a speaker at all, as you can play the sound "on teh player" directly. Check the locations system script (the scripts are in tdm_base.pk4 iirc) to see how it works.

Actually the location entity itself that that script runs is a speaker (a hidden one. It inherits the speaker base in the def file), and that's what's technically playing the ambients, in its speaker guise.

I know because I wrote it. ;) But it could be possible to script a sound even without a speaker too for all I know. Experiment with the play-sound function and see (can't recall the function name just now). I just made it activate that entity as a secret speaker because I didn't know any better at the time, and it worked anyway. (And it's quite possible I didn't know what I was really doing in my own script. I thought I was playing the speaker. I pre-loaded the tracks into it as if a speaker and everything. But was I really? Experiment with it and see.)

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Not for guards with paulsdrons worked in the model already, but thats okay, there are quite a few others to work with.

 

 

I'm pretty sure only the citywatch have pauldrons built into the model, but there is a version without the pauldrons that can be used instead (or you could make a skin and set them to nodraw).

Link to comment
Share on other sites

 

I'm pretty sure only the citywatch have pauldrons built into the model, but there is a version without the pauldrons that can be used instead (or you could make a skin and set them to nodraw).

One of the Elite Non-Citywatch guards has them too, but all the others are enough to work with.

I am not quite far enough yet, to work with the skins, but if it is necessary and I work it out, I will try that, thanks.

 

Another question:

I am trying to do a patrol route, that leads one of the AI "out of the map" (actually in another part of the map the player has no access to.)

I tried doing this via the "atdm:teleport", and tried several ways to trigger this. First I tried switching the path the patrol is on, then I tried having the path linking to the path in the "outside room", with the last path corner triggering the teleport, then I tried inserting a wait after the last path corner, but whatever I do, the AI gets teleported and then stops dead, not continuing on any path, seemingly no matter what I try.

 

Has someone any idea what the problem might be? Or maybe a workaround? (I will try some other ideas for workarounds, but I really would like to get the AI to teleport and be able to resume their patrol from there.)

Could it be the teleport itself that is the problem? Somehow stopping the patrol?

I am out of ideas at the moment.

Link to comment
Share on other sites

You can use a change target entity to give the Ai the new path node as a target and trigger that entity along with the teleporter from the last path node of the old route.

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

Are there humanoid AI in the area you're teleporting him to?

 

If not, place an AI->AAS_flood->aas32_flood entity on the floor of the destination. This generates AAS areas in the destination rooms, allowing pathfinding to work. With no AAS areas, he'll just stand there when he arrives.

  • Like 1
Link to comment
Share on other sites

Wow, I've known about that problem for a long time and didn't know you can force an AAS in the dmap. Good piece of knowledge!

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Does anyone know what script is being used here to make the background continuously move

 

I am trying to make a train that has the background scrolling past like that. I contacted Shadowhide who redirected me to the original creator Constantine who read my message but didn't respond so does anyone have access to that original script? or know how to make it work?

Edited by Goldwell
Link to comment
Share on other sites

I guess he used func_movers together with a script.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Are there humanoid AI in the area you're teleporting him to?

 

If not, place an AI->AAS_flood->aas32_flood entity on the floor of the destination. This generates AAS areas in the destination rooms, allowing pathfinding to work. With no AAS areas, he'll just stand there when he arrives.

Great!

Had I just put a dummy there to test something, I would have saved so much time... Well, it helped me to get a more streamlined method working, with less entities and triggers around, so something good came out of it.

 

The aas32_flood entity worked wonders :-)

Thanks.

Good to know that AI needs access to an area, for aas to be created, too.

Link to comment
Share on other sites

Is it possible to have an arrow fire from a given location pointing towards somewhere else? I assume its possible with scripting but if theres an entity that would do it that would be great as well

 

Its for a trap i'm setting up. The player presses a button and then an arrow fires at them from the wall behind

Edited by Goldwell
Link to comment
Share on other sites

I think there was a trap like that in Ulysees (you opened a desk in the basement you start in and an arrow shot out) - not sure how Sotha set it up, but would be easy to check :-).

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

I think there was a trap like that in Ulysees (you opened a desk in the basement you start in and an arrow shot out) - not sure how Sotha set it up, but would be easy to check :-).

 

I thought I saw something like that in that FM. Thank you!

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.
      · 2 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...