Jump to content
The Dark Mod Forums

Creating a random, timed conversation


Springheel

Recommended Posts

I'm trying to achieve something and I'm not quite sure how to do it.

 

I want to have two AI go into a room and do the following:

 

AI1: Speak a specific soundshader

 

AI2: Speak a specific soundshader

 

repeat this sequence endlessly until triggered (possibly based on a set amount of time).

 

Is there any way to do that? I guess basically I just want to cycle an animation over and over.

 

Huh, as I was typing this I thought of a possibility--what about the two AI going into a trigger_entityname trigger that triggers the conversation. As long as they stay in it the conversation should play over and over, correct? And then when I want it to end I could trigger something to teleport or destroy the first trigger?

Link to comment
Share on other sites

Or it might be less taxing to use a trigger_timer to continuously fire the converation?

 

That would allow you to specify a "set amount of time" very easily too, and end the sequence just by turning it off, and letting them continue on paths.

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

If there's any trouble with the trigger methods, this could be done with a very short script. The first test map and script I ever posted to this forum (queueing AI) does exactly this. The conversation calls the script which loops endlessly (keeping the conversation alive and repeating its actions) until a lever is thrown. I can strip that down to just the bit you'd need.

Link to comment
Share on other sites

I would use a trigger timer if the AI are stationary in the area.

If the AI are roaming, you could use trigger_multi_entityname (or something like that). One AI stands still. Other AI patrols. When he hits the trigger close to the stationary guard, he deviates from his path to have a chat.

 

I've used this in Phrase_book, for example. The lockpick thugs and the mansion front-door guard.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Or it might be less taxing to use a trigger_timer to continuously fire the converation?

 

That would allow you to specify a "set amount of time" very easily too, and end the sequence just by turning it off, and letting them continue on paths.

 

Brilliant. Didn't even know there was such a thing. :)

Link to comment
Share on other sites

Hmm, there's nothing that explains how to create a "set amount of time" with a trigger_timer. If I want the trigger to continuously fire for 10 minutes, how do I do that?

Link to comment
Share on other sites

Set the "Delay" on a trigger_relay to turn it off after 600 seconds.

 

(So the entire setup would be a trigger_timer with "wait" set to the duration of the conversation, targeting the conversation. A trigger_relay triggered at the same time as the timer/conversation is first initiated, which turns off the timer when time is up.)

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

For future reference, here's how I did it.

 

1. Create a trigger_namedentity, with one of the AI as the named entity. It targets the conversation.

 

2. AI targets a pathnode inside the trigger. When they enter, the conversation starts.

 

3. A second trigger_once_namedentity targets a trigger relay, with a delay of 10 minutes.

 

4. Trigger relay targets a target_teleport, which teleports the trigger_named_entity away.

 

So the way it plays out is that AI walk into the trigger and start playing the conversation. Because they remain in the trigger after the conversation is done, it triggers again and the continues playing it over and over until 10 minutes are up. At that point the trigger is teleported away and the conversation is not restarted anymore. The AI continue to their next pathnode.

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • 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.
      · 7 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
×
×
  • Create New...