Jnon Posted September 15, 2025 Report Posted September 15, 2025 I'm trying to set up a Stim/Response system for a furnace that powers a room (lights, doors, etc). One thing I want to do is activate a speaker to play the generator startup sound/running loop from a fire stim, and stop the speaker from a water stim. The problem is that the only way to activate a speaker I know of is by trigger, and triggers don't differentiate between Activating and Deactivating. Lights and Frob settings can be toggled On/Off with Responses, but there's nothing for speakers. So right now I have a Fire and Water stim activating a trigger targeting the speaker, and either stim can start or stop the speaker. If the player uses a fire stim originally (as intended) and a water stim to stop it, everything works as intended. If, however, a player starts by using a water arrow on the furnace, the generator noise will start, and the Fire stim will stop it. I'd like to set it up so only a Fire stim will start the speaker, and only a Water stim will stop it. Do I have any options in DarkRadiant for this, or would I need to do scripting? Quote
JackFarmer Posted September 15, 2025 Report Posted September 15, 2025 (edited) Water arrow shot at entity in question : Machine off shall play Fire arrow shot at entity in question: Machine on shall play Fire arrow shot AGAIN at entity in question: nothing shall happen Water arrow shot at entity in question: Machine off shall play Water arrow shot AGAIN at entity in question: nothing shall happen correct? Edited September 15, 2025 by JackFarmer Quote
Jnon Posted September 15, 2025 Author Report Posted September 15, 2025 1 minute ago, JackFarmer said: Water arrow shot at entity in question : Machine off shall play Fire arrow shot at entity in question: Machine on shall play Fire arrow shot AGAIN at entity in question: nothing shall happen Water arrow shot at entity in question: Machine off shall play Water arrow shot AGAIN at entity in question: nothing shall happen correct? Yes, that is correct. The generator is in an off state at map start, so the first arrow would be Fire (generator on), but otherwise this is the situation I'm aiming at. Quote
thebigh Posted September 15, 2025 Report Posted September 15, 2025 You can probably do this by creating two identical entities, one that responds only to a fire arrow stim and one that responds only to a water arrow stim, and use the atdm:teleport entity to swap between them as required. 1 Quote My missions: Stand-alone Duncan Lynch series Collabs Down and Out on Newford Road the Factory Heist A Collector's Errand (with Bikerdude) The Wizard's Treasure A House Call The House of deLisle
JackFarmer Posted September 15, 2025 Report Posted September 15, 2025 30 minutes ago, thebigh said: You can probably do this by creating two identical entities, one that responds only to a fire arrow stim and one that responds only to a water arrow stim, and use the atdm:teleport entity to swap between them as required. @Jnon This might be the easiest approach (if you do not want to script something). Doing so would also remove the need to check whether a water or a fire arrow has been fired as at this particular moment only one item is in place and does only react according to the defined stim property. 2 Quote
Jnon Posted September 15, 2025 Author Report Posted September 15, 2025 I guess this is the best approach. Thanks, I'll give it a try. Quote
Dragofer Posted September 19, 2025 Report Posted September 19, 2025 This functionality is already integrated into extinguishable flame entities' scroptobjects (check the light sources folder for i.e. torch flames that play sounds when lit and extinguished). You can also tag on your other stim effects to that entity's water and fire responses. The best way is still to make a pair of short scripts that share a global variable for the speaker state. Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
Jnon Posted September 21, 2025 Author Report Posted September 21, 2025 On 9/19/2025 at 2:35 PM, Dragofer said: The best way is still to make a pair of short scripts that share a global variable for the speaker state. I'd need to read through some scripting tutorials, I don't have much experience with that side of things yet. Quote
datiswous Posted September 21, 2025 Report Posted September 21, 2025 On 9/19/2025 at 7:35 AM, Dragofer said: This functionality is already integrated into extinguishable flame entities' scroptobjects Do you know a mission that uses this? Quote
Dragofer Posted September 21, 2025 Report Posted September 21, 2025 9 hours ago, Jnon said: I'd need to read through some scripting tutorials, I don't have much experience with that side of things yet. There's this guide that I wrote: https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting in particular: https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Ways_of_calling_a_script#Stim/Response https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_More_scripting_basics#Where_to_create_variables https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_More_scripting_basics#Using_the_TDM_Script_Reference 2 hours ago, datiswous said: Do you know a mission that uses this? I think Goldwell likes to use such setups. But basically all you need is to have an extinguishable light entity with its snd_lit and snd_extinguished spawnargs matching the sounds you need, as well as a tiny light radius and maybe some low-profile lit/extinguished particles so it can be hidden more easily. 1 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
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.