Home   Help Search Login Register  

Author Topic: Conversation between NPC's  (Read 518 times)

0 Members and 1 Guest are viewing this topic.

45mDex

  • Guest
Conversation between NPC's
« on: 16 Feb 2004, 22:18:01 »
Okay, thanks Myke for all previous help with my last post. Now I got a new question. Let's say you want to walk up to 2 non player characters, and when you do, they carry on a conversation back and fourth. I've tried this with some scripting, but usually ends up messing up. What i've done in the past to make this work would be to have Unit A trigger the beginning of the conversation by his "Move" waypoint. Unit B would then begin his part of the conversation after a brief timeout. I quickly found out that this turned into a mess because the conversations would always get out of sync. So is there an easier way using scripting or gamelogics?? :-\
« Last Edit: 16 Feb 2004, 22:18:39 by 45mDex »

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:Conversation between NPC's
« Reply #1 on: 16 Feb 2004, 22:56:30 »
Ok, let's see if i understand you correctly.

You, (the player) comes to 2 AI controlled Units (UnitA and UnitB) which are about to speak with each other. You as the player has nothing to do with (except following the convo).

As far as i know, you can do this with Gamelogics also with a script. Maybe you should give more info about what you already tried to do.

Also it would be helpful to know if you're only displaying text, or do you have sound files attached to it.

With Gamelogics you can do it basically very easy, as GL's can have waypoints which they'll follow.

So a way to do this could look like this:

Create a GL and assign some waypoints to it. Just ordinary "move" should work.
In the Init field of the first waypoint, insert a line which will let UnitA say his first part.
In the Init field of the second waypoint insert a line which will let UnitB say his reply.

and so on.

For the timings (as a gamelogic "walks" really fast from one WP to the next) use the timeout option into the waypoints.

To let the convo begin, just setup a switch trigger, which is synced with the GL's first waypoint.

All in all, this should work like an In-editor script...lol

Hope this helps you a step further

45mDex

  • Guest
Re:Conversation between NPC's
« Reply #2 on: 17 Feb 2004, 00:29:48 »
Hey Myke. I don't have any specific mission examples to show you. But I know in the past when I attempted to design this, Unit A and B would talk but they would end up going throught thier conversations at the wrong time. Unit A would still be talking while Unit B started his part of the conversation. But that is a good idea with the game logics, i'll have to try that. I'll combine that with my previous post.  I'll send up a trigger to activate the conversation with west present (my group). But I will use a similar idea as my previous topic (by defining variables in my description.ext file (e.g. convo1 = false)).  I will then use a trigger, set to size 0, which will then set the action to true.

And from there I'll create the game logic with waypoints for the conversation. Kind of the long way to do it, but i'm sure it will work every time. Thanks for the help, i'm only a novice at this stuff.

 ;D

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:Conversation between NPC's
« Reply #3 on: 17 Feb 2004, 01:58:26 »
no need to split up the triggers like for cutscenes...as UnitA and UnitB arealways the same loons....a somple west activated switch trigger should do the job