Jump to content
The Dark Mod Forums

Recommended Posts

Posted
3 hours ago, thebigh said:

When a conversation is triggered, any bark that is already playing at that time continues until it's finished. I want the AI to stop his bark the instant the conversation is triggered.

Oh that sounds like a problem ! I understand but I am afraid I can't help with that. Hope someone else can! Sorry ! 

  • Like 1

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Posted

I dunno, but looking at the TDM Script Reference, there's a few things you might try from a triggered script. Like <entity>.stopSound(channel), where channel might be SND_CHANNEL_ANY. Don't know if this works with AI.

Or maybe <ai>.bark(sound), where sound could be a short silence clip. Or even just null?

Other possibilities I guess:

<emitter>.Off(); <emitter>.On();

startSound(...);

playAndLipSync(...);

Posted (edited)

Maybe something with

idle_bark_interval_min

or

idle_bark_interval_max 

Maybe you can set it so that barks are disabled right before the conversation starts.

 

Or set

def_vocal_set 

temporary to 

atdm:ai_vocal_set_mute

via script and then set it back after

 

Edit: these are spawnargs, so I don't think they can be altered in runtime.

Edited by datiswous
Posted

I want to do something (e.g., play a sound) when an AI's alert status changes (like they go from Idle to Suspicious). My brain must not be working well today, because I can't figure out how to do it. Any help?

Posted
On 2/22/2026 at 4:38 PM, joebarnin said:

I want to do something (e.g., play a sound) when an AI's alert status changes (like they go from Idle to Suspicious). My brain must not be working well today, because I can't figure out how to do it. Any help?

You can set up a hidden objective with the "AI is alerted" component and then have it call a script, or you can put together something like this and call it however you wish: 

 

void alert_sound()
	{
	ai guard = $atdm_ai_townsfolk_commoner_3; // Or whatever the name of your ai is
	if (guard.AI_AlertIndex == 5 && !guard.AI_KNOCKEDOUT && !guard.AI_DEAD)
		{
		sys.println("Speaker is triggered upon alert");
		sys.trigger($alert_speaker);
		}
	}

"AI_AlertIndex" is the key you're looking for, I believe. It goes from 1 to 5: 1 being idle, 5 being Combat

  • Like 4
Posted (edited)

why does my bevel have slits in it?  I beveled the four corners on this brush, but 2 of them are like this. [edit] this is in-game. It looks fine in the DR preview window.

skeletonkey (2026-02-27 13-28-49) (1063.32 4500.71 166.32).jpg

Edited by grodenglaive
Posted
22 minutes ago, grodenglaive said:

why does my bevel have slits in it?  I beveled the four corners on this brush, but 2 of them are like this. [edit] this is in-game. It looks fine in the DR preview window.

skeletonkey (2026-02-27 13-28-49) (1063.32 4500.71 166.32).jpg

https://bugs.thedarkmod.com/view.php?id=6287

If it's really problematic, you can export the worldspawn as a model and that will fix it.

  • Like 1
  • Thanks 1

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions:

With Kerry000: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs A Reciprocal Gambit

Posted (edited)
6 hours ago, datiswous said:

What is the difference between map merge and import map?

I've always wondered that, but was afraid to try it (I have only used import map).

Edited by grodenglaive
Posted

I'd like to have a mechanism like the game Portal, where there's a "hole" in a wall that you can step through to another location (and you can see the target location through the portal). I know I've seen this before in other FMs, but I can't recall where, and I can't figure out the best way of doing this. Thanks for any suggestions.

Posted
7 minutes ago, joebarnin said:

I'd like to have a mechanism like the game Portal, where there's a "hole" in a wall that you can step through to another location (and you can see the target location through the portal). I know I've seen this before in other FMs, but I can't recall where, and I can't figure out the best way of doing this. Thanks for any suggestions.

I know what you mean, I am pretty positive this can be found in dragofer's "Down By The Riverside".

  • Thanks 1
Posted (edited)
4 hours ago, joebarnin said:

I'd like to have a mechanism like the game Portal, where there's a "hole" in a wall that you can step through to another location (and you can see the target location through the portal). I know I've seen this before in other FMs, but I can't recall where, and I can't figure out the best way of doing this. Thanks for any suggestions.

You mean this effect?

https://www.youtube.com/watch?v=buB29Qvv0c8

What I used is a teleportation script and an x-ray screen (because actually you look into the same room, but altered). There's still a wobble when teleported though.

 

3 hours ago, JackFarmer said:

I am pretty positive this can be found in dragofer's "Down By The Riverside".

There's teleporting there, but I don't remember you can look into that other place.

I think The Painters Wife might have something like this.

 

I think there are 2 possibilities for making the "look into other place" effect work. One is faking the new place via an x-ray screen or another room next to it that you look at.

The other way is to use a camera screen. The camera is placed in the new location and the door is also a screen.

Also maybe using a cubemap is possible. I think that's how they did it in The Painter's Wife?

Edited by datiswous
  • Thanks 1
Posted
7 hours ago, datiswous said:

You mean this effect?

https://www.youtube.com/watch?v=buB29Qvv0c8

What I used is a teleportation script and an x-ray screen (because actually you look into the same room, but altered). There's still a wobble when teleported though.

 

Yes, that's the one I remembered. Have to say, my memory isn't what it used to be - not only was it not an FM, it was only a few months ago that I saw it. Oh well...

Thanks again. I'll probably use this technique, maybe add a quick flash to hide the wobble.

Posted
16 hours ago, joebarnin said:

I'd like to have a mechanism like the game Portal, where there's a "hole" in a wall that you can step through to another location (and you can see the target location through the portal). I know I've seen this before in other FMs, but I can't recall where, and I can't figure out the best way of doing this. Thanks for any suggestions.

I have this on my upcoming fm. I can share it with you, but I might not get to it today. I think it works pretty well. 

 

  • Like 1
Posted (edited)

I used a cube map and the doorway was basically a mirror with the cube map texture. Making the cube map is really simple using the console function, but I don't remember the command at the moment.

[edit] console command is:  envshot [prefix] [size]

cubemap instructions are here Cube maps - The DarkMod Wiki

 

Edited by grodenglaive
Posted (edited)

Only issue was I had to reverse the images, so the mirror wasn't mirrored, if that makes any sense.

[Edit] oh and if your destination room has a different orientation, fixing the cube map gets complicated. It took some trial and error.

Edited by grodenglaive
Posted
5 hours ago, joebarnin said:

Yes, that's the one I remembered. Have to say, my memory isn't what it used to be - not only was it not an FM, it was only a few months ago that I saw it. Oh well...

Thanks again. I'll probably use this technique, maybe add a quick flash to hide the wobble.

Ah, the X-ray technique  looks good, I forgot about  that one.

Posted

This is how mine turned out using a cubemap:

I had added a ripple effect and clouds. 

I think the x-ray method datiswous posted looks better and is more seamless, depending on what you're going for. 

  • Like 1
Posted

When you look into a new room x-ray ist necesary. X-ray is only needed when you place the door somewhete in a room and you can walk around it.

You can just use a copy of the room you teleport to. So you look into that room, but when you try to enter, you teleport and so never end up in that room.

But you have to make it clear somehow you teleported to a new area otherwise players don't even understand something special happened.

Posted
14 minutes ago, grodenglaive said:

This is how mine turned out using a cubemap:

Is it intended that during teleportation the screen goes black a short time? Also you end up farder away from the table. It still looks cool though.

Posted
5 hours ago, datiswous said:

When you look into a new room x-ray ist necesary. X-ray is only needed when you place the door somewhete in a room and you can walk around it.

You can just use a copy of the room you teleport to. So you look into that room, but when you try to enter, you teleport and so never end up in that room.

But you have to make it clear somehow you teleported to a new area otherwise players don't even understand something special happened.

OK, interesting. Well in my case there isn't room for a copy of the room anyway, hence the cubemap.  But I'm happy enough with how it turned out. 

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