grayman 2968 Posted October 8, 2019 Report Share Posted October 8, 2019 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. Quote Link to post Share on other sites
STRUNK 270 Posted October 8, 2019 Report Share Posted October 8, 2019 @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 ... Quote Link to post Share on other sites
grayman 2968 Posted October 8, 2019 Report Share Posted October 8, 2019 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. 1 Quote Link to post Share on other sites
STRUNK 270 Posted October 8, 2019 Report Share Posted October 8, 2019 @grayman Yes, I tested it and got rid of the caulk. It was a sealing problem. Thank you very much. Quote Link to post Share on other sites
Amadeus 344 Posted October 8, 2019 Report Share Posted October 8, 2019 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? Quote FMs: A Good Neighbor Link to post Share on other sites
peter_spy 1529 Posted October 8, 2019 Report Share Posted October 8, 2019 (edited) 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 October 8, 2019 by peter_spy Quote Misc. assets for TDM Link to post Share on other sites
STRUNK 270 Posted October 8, 2019 Report Share Posted October 8, 2019 (edited) @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 October 8, 2019 by STRUNK Quote Link to post Share on other sites
Amadeus 344 Posted October 8, 2019 Report Share Posted October 8, 2019 Thanks Strunk, I'll give it a try later. I'm sure there is a simple solution and I'm just overthinking it. Quote FMs: A Good Neighbor Link to post Share on other sites
Geep 247 Posted October 8, 2019 Report Share Posted October 8, 2019 @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 Quote Link to post Share on other sites
STRUNK 270 Posted October 8, 2019 Report Share Posted October 8, 2019 @Amadeus I have tried it and it works : ) https://streamable.com/hzask Quote Link to post Share on other sites
Amadeus 344 Posted October 8, 2019 Report Share Posted October 8, 2019 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 Quote FMs: A Good Neighbor Link to post Share on other sites
grayman 2968 Posted October 8, 2019 Report Share Posted October 8, 2019 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! Quote Link to post Share on other sites
Destined 614 Posted October 8, 2019 Report Share Posted October 8, 2019 @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). 1 Quote Link to post Share on other sites
STRUNK 270 Posted October 8, 2019 Report Share Posted October 8, 2019 @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! Quote Link to post Share on other sites
Destined 614 Posted October 8, 2019 Report Share Posted October 8, 2019 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. 1 Quote Link to post Share on other sites
STRUNK 270 Posted October 8, 2019 Report Share Posted October 8, 2019 @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? Quote Link to post Share on other sites
Dragofer 1351 Posted October 8, 2019 Report Share Posted October 8, 2019 @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. Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
Amadeus 344 Posted October 8, 2019 Report Share Posted October 8, 2019 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)? Quote FMs: A Good Neighbor Link to post Share on other sites
Dragofer 1351 Posted October 8, 2019 Report Share Posted October 8, 2019 (edited) 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 October 8, 2019 by Dragofer 1 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
STRUNK 270 Posted October 8, 2019 Report Share Posted October 8, 2019 @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 : ) 1 Quote Link to post Share on other sites
grayman 2968 Posted October 8, 2019 Report Share Posted October 8, 2019 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'. Quote Link to post Share on other sites
Amadeus 344 Posted October 8, 2019 Report Share Posted October 8, 2019 Thanks grayman! I'll take a look tonight and see what happens Quote FMs: A Good Neighbor Link to post Share on other sites
STRUNK 270 Posted October 8, 2019 Report Share Posted October 8, 2019 (edited) @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 October 8, 2019 by STRUNK 1 Quote Link to post Share on other sites
Amadeus 344 Posted October 8, 2019 Report Share Posted October 8, 2019 Oh snap, that's perfect strunk. Do you have a test map I can look at? Quote FMs: A Good Neighbor Link to post Share on other sites
STRUNK 270 Posted October 8, 2019 Report Share Posted October 8, 2019 @Amadeus Ignore all other things, the setup is above the purple light. https://filebin.net/hwg1u5ltnljmzbfn Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.