Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

10 minutes ago, STRUNK said:

@grayman

If I would have all the visportals touch worldspawn, as they should, the sound would also stay in the room .. right?

 

No, the sound will leave the room through its visportals.

Share this post


Link to post
Share on other sites

@grayman

Oh sorry, I forgot to mention the doors. If they are open the sound goes through, if the are closed the sound is dimmed of course.

The biggest issue was the sound comming through the wall ...

Share this post


Link to post
Share on other sites
1 minute ago, STRUNK said:

@grayman

Oh sorry, I forgot to mention the doors. If they are open the sound goes through, if the are closed the sound is dimmed of course.

The biggest issue was the sound comming through the wall ...

If you've properly visportaled the run from the emitter to the listener, you shouldn't hear anything through the walls. If you do, you prolly have a worldspawn leak somewhere between emitter and listener.

  • Like 1

Share this post


Link to post
Share on other sites

So I've got a lever and a light (the grill light model specifically). I want it so that when the lever is in its "off" position, there is a red light showing. When the lever is turned on by the player, I want that red light to turn green. How can I do this?

Share this post


Link to post
Share on other sites

did read it and it's talking about caulk right away ... I think I'm just gonna test without caulk (and with sealing visportals) to see what happens : )

 

Yeah, that's poor wording. Caulk is just an invisible material. Any brushes using solid material would do.

Edited by peter_spy

Share this post


Link to post
Share on other sites

@Amadeus

My guess is to have 2 light sources, one green and one red, trigger them both with the switch, and have one set to spawnarg "start_off" 0, and the other to "start_off" 1 ..

Edited by STRUNK

Share this post


Link to post
Share on other sites

Thanks Strunk, I'll give it a try later. I'm sure there is a simple solution and I'm just overthinking it.

Share this post


Link to post
Share on other sites

@Destined @Springheel

OK, I've figured out the problem, which only occurs when invoking the updated stock-distributed trigger_look.script found in tdm_base01. If you are using one of the earlier custom versions from the forum, the problem will not appear. Specifically, the update replaced 2 calls to a locally-defined function "length" with calls to system function "vecLength", but neglected to prefix it with "sys." This caused a divide-by-zero error and effective ignoring of the "tolerance" spawnarg. Please someone correct this in 2.08. [Corrected, tested replacement file attached]

Also, please someone add to the wiki entry that a stock script is available, so you don't *have* to use a custom script (except in the short term to get around this bug). BTW, the wiki did describe how to set up the custom script... I just misinterpreted the relevance of that discussion. Thanks, Destined, for setting me straight.

trigger_look.script

Share this post


Link to post
Share on other sites

Oh snap! So now my only concern is that I'm using the grill light color_me model, so I hope that the skin on the model changes as the light changes. I'll play around with it after work and see what happens

Share this post


Link to post
Share on other sites
1 hour ago, STRUNK said:

@grayman

Yes, I tested it and got rid of the caulk. It was a sealing problem.

Thank you very much.

Cool!

Share this post


Link to post
Share on other sites

@STRUNK: did you test you visportals with r_showportals? If you had a sealing problem, the visportal should also make some problems (i.e. not close properly).

  • Like 1

Share this post


Link to post
Share on other sites

@Destined

No I didn't .. even though I have been watching Springheels video tut about visportals today, I didn't think of that. Good one to remember for next time!

Share this post


Link to post
Share on other sites

It is generally a good idea to check if they are working properly. Otherwise you will have to spend a lot of time leak hunting later on.

  • Like 1

Share this post


Link to post
Share on other sites

@Amadeus

I was curious and went checking out this colorme grill light .. and the model doesn't change from a lightsource that ist not it's own. If it was only that simple : (

I think I would solve it myself by recreating this model in DR (I haven't got into other 3d programs) and making the glass from some matt transparent material that would be affected by the colored lights I suggested.

I am really curious, and have been looking for a trigger or something that can target individual spawnargs and their values, for that could open a lot of posibillities, but I can't find it, and probaly there is no such entity. Probably some scripting and/or stim/response is involved in changing the colorme light with a switch.

@Everyone : Is there an easy way to change/target spawnarg values with a switch/trigger?

Share this post


Link to post
Share on other sites

@Amadeus as far as I can tell TDM doesn't do skin toggles on models via simple/electric light entities, only if the light entity is one of those with a particle, scriptobjects etc. Well, maybe you can get a simple light entity to exhibit that behaviour by giving it the spawnarg "scriptobject" "light_ext". Then target the lamp model from one of the lights and give the lamp model skin_lit and skin_extinguished spawnargs.

@STRUNK there's a script function and a stim/response effect to change spawnargs - setkeyval - but, from what I know, changing spawnargs ingame rarely does anything because they're read at map start (when everything spawns). There are some exceptions, for example adding a target to an AI will get it to start patrolling if it didn't have a patrol previously. Changing spawnargs ingame can also be handy for scripting, as scripts can read spawnargs and respond according to what the spawnarg is at that moment.

Share this post


Link to post
Share on other sites

hmmm, thanks for the suggestions guys. I'll give it a try tonight. Is there a way I can hide the model and then trigger it to appear (and of course, trigger the other model to disappear)?

Share this post


Link to post
Share on other sites

Lamp entities and particle lights (i.e. light_oilflame) can toggle hide on targeted models if the models have "hide" "1" enabled. One light targets one model: as one light is off, one model will remain hidden at map start.

Could try my above suggestion of giving your plain lights a scriptobject, otherwise maybe reconfigure a light_oilflame entity to act like an electric light (= no particle model, no extinguish sound, all stim/response disabled).

Edited by Dragofer
  • Thanks 1

Share this post


Link to post
Share on other sites

@Amadeus

You could have 2 invisable sliding doors and bind the red light to one, and the green one to the other, have one to be open and one closed at gamestart, and trigger them both with the switch.

I'm gonna try it : )

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, STRUNK said:

@Amadeus

I was curious and went checking out this colorme grill light .. and the model doesn't change from a lightsource that ist not it's own. If it was only that simple : (

I think I would solve it myself by recreating this model in DR (I haven't got into other 3d programs) and making the glass from some matt transparent material that would be affected by the colored lights I suggested.

I am really curious, and have been looking for a trigger or something that can target individual spawnargs and their values, for that could open a lot of posibillities, but I can't find it, and probaly there is no such entity. Probably some scripting and/or stim/response is involved in changing the colorme light with a switch.

@Everyone : Is there an easy way to change/target spawnarg values with a switch/trigger?

To see how I did it in WS5, open ws5_commerce.map in DR and search for this entity:

Switch11

It targets other entities, and by examining the group, and looking at the routines Toggle11() and ToggleRoom() in ws5_commerce.script, you should be able to figure out how to trim it all down to work for your case. Ignore script references to the 'panel indicator' and the 'door'.

 

Share this post


Link to post
Share on other sites

Thanks grayman! I'll take a look tonight and see what happens

Share this post


Link to post
Share on other sites

@Amadeus

This actually works! : )

https://streamable.com/hpzy3

I got 2 sliding  doors, about the same size of the  grill light, with spawnarg "translate_speed" set to 2000 (so fast it looks like it doesn't move), one with spawnarg "open" set to 0, the other one set to 1, and trigger them both with the same switch. Have 2 of these grill lights, one green and one red and bind the green to a sliding door, and the red to the other, .. one of them is always "hidden" in the wall, and the other visable.

Spawnarg "translate"  set to 20, on x,y or z, depending on the orientation, seems enough to hide the model, and you can use the first suggestion I did to light up the surroundings with a seperate red and green light.

5 hours ago, STRUNK said:

@Amadeus

My guess is to have 2 light sources, one green and one red, trigger them both with the switch, and have one set to spawnarg start_off 0, and the other to start_off 1 ..

I used this model: models/darkmod/lights/non-extinguishable/grill_light_short.lwo

 

Edited by STRUNK
  • Thanks 1

Share this post


Link to post
Share on other sites

Oh snap, that's perfect strunk. Do you have a test map I can look at?

Share this post


Link to post
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.


×
×
  • Create New...