Home   Help Search Login Register  

Author Topic: talking at a distance  (Read 558 times)

0 Members and 1 Guest are viewing this topic.

Tinky the target

  • Guest
talking at a distance
« on: 14 Feb 2004, 02:03:36 »
Hey y'all

I was wondering if there is a way to have two AIs conversing, and what they are saying will appear on the screen (as text) when the player is near them.  But as the player moves away the text goes.

Also, to make it more confusing ??? would it be possible for the AI conversation to continue, and if the player walks back toward them the text reappears carrying on the conversation from the new point (sinec some of the conversation would have been missed while not near them).

Hope you can understand me!!
« Last Edit: 14 Feb 2004, 02:03:59 by Tinky the target »

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:talking at a distance
« Reply #1 on: 14 Feb 2004, 03:15:14 »
if u had the conversation as a script, you could do it by having a check before printing any info:

here's an example:

Quote
#sentence1
? (player distance _p2 < 2.5): CutText["blah blah blah...","PLAIN DOWN",1] ; ~2 ; CutText["","PLAIN DOWN",1];  goto "sentence2"

~2

#sentence2
? (player distance _p2 < 2.5): CutText["blah blah blah...","PLAIN DOWN",1]; ~3; CutText["","PLAIN DOWN",1]; goto "sentence3"

~3

as u can see, the text is only shown if the player is within range, but the convo still goes on, so that if the player comes in late he will miss a part of the conversation.  the only thing im not sure about is whether the ~times between the two cuttexts work.
« Last Edit: 14 Feb 2004, 03:16:51 by .pablo. »

Tinky the target

  • Guest
Re:talking at a distance
« Reply #2 on: 14 Feb 2004, 13:20:42 »
thanks pablo, sounds like a good way of doing it

or temporary measures i just had a repeating detection trigger that kicked off a script which randomly chose different parts of the convo...obviously that wont work too well so I'll definately give yours a go

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:talking at a distance
« Reply #3 on: 25 Feb 2004, 02:26:47 »
The "say" command has an easy way to do this, built in. Here is the command:

unit say ["speech name", distance it can be heard]

speech name is defined in the description.ext
the distance is a number which is the maximum # of meters away the player/camera can be and still have the titles show.

If you aren't using sound files though, then just use pablo's method.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Tinky the target

  • Guest
Re:talking at a distance
« Reply #4 on: 25 Feb 2004, 11:34:14 »
thanks general....

I'll look into this