Some one told me this works.
make 2 enemies. give one a targetname $talker1.
and the other a targetname $talker2
make a brush with a "trigger once" attached to it.
give the trigger key setthread
value speech
now in the script all u have to type in is...
speech:
$talker1 say den_m2l2_218p
$talker1 waittill saydone
wait 1
$talker2 say den_m2l2_219h
$talker2 waittill saydone
end
easy ay.
if u want to do more speech ingame jus do the same, but this time give the trigger
key setthread
value speech1 (just add a different number each time at the end of "speech")
so this time it will be....
speech1:
$talker3 say den_m2l2_249q
$talker3 waittill saydone
wait 2
$talker4 say den_m2l2_250a
$talker4 waittill saydone
end
_________________
...prepare for your finest hour...thanx
remember.
U can also get them to look at each other which is very simple to do...
just add
speech:
$talker1 lookat $talker2
$talker1 say den_m2l2_218p
$talker1 waittill saydone
(if u want the person to stop lookin after saydone, just add the line..)
$talker1 lookat NULL
I would really like to know if it does. I messed witrh it but couldn't get it to work. The bots worked fine but they never started talking. I tried the lines in several places in the script. Does anybody know cause I could have ablast with this if I could get it to work. There are so many wav files to use it's awesome, and making custom ones, well that would be the shiznit. 8)
Scripting Speech fo AI
Moderator: Moderators
- small_sumo
- Lieutenant General
- Posts: 953
- Joined: Mon Jul 01, 2002 4:17 pm
- Contact:
Well for SP; you have to extract the character's tiki you want, and adjust the lines at the end, to something like the first section of cose.
( Just to point out these are from a test map I made called "kill_general", so you'll see the word "kill" splashed about all over the place. )
This code basically tells the game where to look for this characters animations, which leads onto where the sounds are. It also contains a line Quaked, which tells radiant to load this character.
Then make a file called kill_generic_dialogue_US.tik and place it in models\human\animation\dialogue. This tiki will contain the animations for the dialogue, I belive this to be the mouth movement, but some also cause characters to wave their arms about the place. It should look like below;
The path is where the animation file is kept. The first reference to dfr_M1L1_add05 in the animations section, is an alias to the animation called, ACTOR_m1l1_add05.skc. The first sound dfr_M1L1_add05 is a reference to a sound alias, i.e. the dfr_M1L1_add05 part.
Then you need a sound tiki, so in your models\sound\missionName folder make a tiki called something like dialog_us_misc. I don't fully understand this file myself, I just take it for granted that it works.
The only bit we're intrested in is the alias part (it should all be on a single line). Firstly it has the alias for the sound(should match the animation tiki).
Secondly is the full sound path. I don't remember what the sound params do so just sopy them.
"Streamed" tells the game not to preload the sound file.
Subtitle "Powel, check the door." is the subtitle displayed, in this case "Powel, check the door" is shown.
Finally, maps "mapName", is the maps the sound will work for. In this tiki place something like below;
Then in the precahce file you need to add, cache models/sound/missionName/dialog_us_misc.tik
But as I say thats for SP, I imagine MP is something similar but since I don't do MP mapping I wouldn't know.
( Just to point out these are from a test map I made called "kill_general", so you'll see the word "kill" splashed about all over the place. )
This code basically tells the game where to look for this characters animations, which leads onto where the sounds are. It also contains a line Quaked, which tells radiant to load this character.
Code: Select all
$include models/human/kill_generic_human.tik
$include models/human/animation/dialogue/kill_generic_dialogue_US.tik
//$include models/human/animation/helmet_flyoff/helmet_flyoff_ranger_private.tik
/*QUAKED ai_kill_allied_1st-ranger_private (1.0 0.5 0.0) (-16 -16 0) (16 16 96)
*/The path is where the animation file is kept. The first reference to dfr_M1L1_add05 in the animations section, is an alias to the animation called, ACTOR_m1l1_add05.skc. The first sound dfr_M1L1_add05 is a reference to a sound alias, i.e. the dfr_M1L1_add05 part.
Code: Select all
setup
{
path models/human/animation/dialogue/M1L1/A
}
animations
{
dfr_M1L1_add05 ACTOR_m1l1_add05.skc
{
client /// Powell, check the door
{
first sound dfr_M1L1_add05
}
}
}The only bit we're intrested in is the alias part (it should all be on a single line). Firstly it has the alias for the sound(should match the animation tiki).
Secondly is the full sound path. I don't remember what the sound params do so just sopy them.
"Streamed" tells the game not to preload the sound file.
Subtitle "Powel, check the door." is the subtitle displayed, in this case "Powel, check the door" is shown.
Finally, maps "mapName", is the maps the sound will work for. In this tiki place something like below;
Code: Select all
TIKI
setup
{
path models/fx/dummy
skelmodel dummy3.skd
}
init
{
server
{
classname ScriptModel
rendereffects +dontdraw
notsolid
}
client
{
settiki none
alias dfr_M1L1_add05 sound/dialogue/M1L1/A/dfr_m1l1_add05h_01.wav soundparms 1.2 0.0 1.0 0.0 10000 10000 dialog streamed subtitle "Powell, check the door." maps "kill_general"
}
}
animations
{
idle dummy3.skc
}But as I say thats for SP, I imagine MP is something similar but since I don't do MP mapping I wouldn't know.

