Home   Help Search Login Register  

Author Topic: Voices in a script?  (Read 576 times)

0 Members and 1 Guest are viewing this topic.

Wolf

  • Guest
Voices in a script?
« on: 03 Dec 2002, 07:04:54 »
Alright, what I want to do is have a continual conversation going on whenever a player is nearby some enemy soldiers, and they don't know he's there, so my question is, is it possible to use a script to play the Russian voices in a game, from a script, and if so, how.
Thank you.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Voices in a script?
« Reply #1 on: 03 Dec 2002, 07:53:24 »
You can play the standard OFP voice command/sounds via scripting... but you might be struggling to get a conversation going.

I had this sort of snippet in a mission I made a while back:

_rand = random 1000
? _rand < 100: unit say "eng11"; goto "nextbit"
? _rand < 200: unit say "eng21"; goto "nextbit"
? _rand < 300: unit say "eng17"; goto "nextbit"
? _rand < 400: unit say "rus4"; goto "nextbit"
...

which would make a unit say a random phrase, (the unit say "eng/rusXX" bit). As I said before, I reckon you'd be struggling to get a half decent conversation out of it though ;)

Bremmer

  • Guest
Re:Voices in a script?
« Reply #2 on: 03 Dec 2002, 10:51:36 »
Hello Wolf

Try downloading my Ai script from the editors depot (its under units and groups I think). It adds a voice engine to any group using many of the ingame sound files (it works for both east an west as well!).

As Sui said, it doesn't really add up to a conversation, but it does add some atmosphere.

 :)

Wolf

  • Guest
Re:Voices in a script?
« Reply #3 on: 03 Dec 2002, 15:58:56 »
k, thanks, I'll give those a try, I just wanted to try it, see if it might add a bit of realism to a mission I'm making where your sneaking around a town, just seemes to me that enemy soldiers and civilians would be talking to each other.