Page 1 of 2

how to do speech...here it is.

Posted: Sun Feb 09, 2003 6:47 pm
by LT.BARNES
I Can succesfully do speech

make 2 enermys. 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

Posted: Sun Feb 09, 2003 9:05 pm
by jv_map
Nice work 8).

Posted: Sun Feb 09, 2003 11:37 pm
by LT.BARNES
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 am currently tryin to finish my single player level. (about 20% complete so alot of work todo, but i am doin loads everyday, so give me 2weeks of less)

Posted: Sun Feb 09, 2003 11:39 pm
by Sputnik
I have speech working fine, but I have one problem: I can't get subtitles to appear!! Do I have to add some special script to make them show up??

Posted: Sun Feb 09, 2003 11:41 pm
by LT.BARNES
i haven't looked into that yet.

u can go look in some of the scripts for the game.

I will look this up and post it on this forum soon

Posted: Mon Feb 10, 2003 7:30 am
by jv_map
Enable subtitles in the advanced options I think. :wink:

Posted: Mon Feb 10, 2003 11:06 am
by Angex
Its worth mentioning the turnto command, as if an AI character is facing away from its target, it won't look at it.

Posted: Mon Feb 10, 2003 5:19 pm
by LT.BARNES
true but the "lookat" works fine to..... i tested ;)

Posted: Tue Feb 11, 2003 1:58 am
by Sputnik
I have subtitles on, but they still don't show up!!

Posted: Tue Feb 11, 2003 4:10 pm
by Angex
LT.BARNES wrote:true but the "lookat" works fine to..... i tested ;)
Really, when I tried it the AI character just waited for me to enter it's view before it said anything, so I had to add a turnto command. Must of had an error somewhere!

Posted: Tue Feb 11, 2003 4:55 pm
by LT.BARNES
o well man.

lookat works and so does turnto

both good good.

should both work fine

Posted: Tue Feb 11, 2003 6:10 pm
by Yarik
$talker1 lookat $talker2

$talker1 say den_m2l2_218
Is it possible to modifiy that code for lets say hmm..

Him to look at a drive by opeltruck like this?

ex.

Code: Select all

$AI1allie lookat $OpelTrk

$AI1Allie say Watch_out

??[/quote]

Posted: Tue Feb 11, 2003 6:42 pm
by jv_map
Yes, the argument supplied to the say command is an animation alias. You can create these yourself, although you need to include all animations for the characters that have to use them. So, you'll have the create your own enemies / friendlies. Read the Single Player Maps Without Test tutorial on how to do so. Just change the sound name in your personal TIKI in the models/human/animation/dialogue folder.

Or, maybe using the regular alias in your script is easier :roll:.

Posted: Tue Feb 11, 2003 7:02 pm
by Yarik
Sorry for asking this again JV_map. But can you direct me to a MOH map decompilet?

Posted: Tue Feb 11, 2003 7:26 pm
by Yarik
After 20 minutes of searching i found this hope it helps
I have speech working fine, but I have one problem: I can't get subtitles to appear!! Do I have to add some special script to make them show up??

Code: Select all

sound_message
This dispays text of what you want. Just a sec let me try it out