how to do speech...here it is.

Post your scripting questions / solutions here

Moderator: Moderators

LT.BARNES
Major
Posts: 288
Joined: Mon Dec 30, 2002 4:37 pm
Location: london

how to do speech...here it is.

Post 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
...prepare for your finest hour...
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Nice work 8).
Image
LT.BARNES
Major
Posts: 288
Joined: Mon Dec 30, 2002 4:37 pm
Location: london

Post 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)
...prepare for your finest hour...
Sputnik
Colour Sergeant
Posts: 85
Joined: Thu Jul 04, 2002 12:36 am
Location: V.A.

Post 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??
Image
LT.BARNES
Major
Posts: 288
Joined: Mon Dec 30, 2002 4:37 pm
Location: london

Post 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
...prepare for your finest hour...
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Enable subtitles in the advanced options I think. :wink:
Image
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post 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.
LT.BARNES
Major
Posts: 288
Joined: Mon Dec 30, 2002 4:37 pm
Location: london

Post by LT.BARNES »

true but the "lookat" works fine to..... i tested ;)
...prepare for your finest hour...
Sputnik
Colour Sergeant
Posts: 85
Joined: Thu Jul 04, 2002 12:36 am
Location: V.A.

Post by Sputnik »

I have subtitles on, but they still don't show up!!
Image
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post 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!
LT.BARNES
Major
Posts: 288
Joined: Mon Dec 30, 2002 4:37 pm
Location: london

Post by LT.BARNES »

o well man.

lookat works and so does turnto

both good good.

should both work fine
...prepare for your finest hour...
Yarik
General
Posts: 1031
Joined: Thu Jan 09, 2003 7:12 pm
Contact:

Post 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]
Skype: Yarik_usa
www.skype.com <---free pc2pc phone
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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:.
Image
Yarik
General
Posts: 1031
Joined: Thu Jan 09, 2003 7:12 pm
Contact:

Post by Yarik »

Sorry for asking this again JV_map. But can you direct me to a MOH map decompilet?
Skype: Yarik_usa
www.skype.com <---free pc2pc phone
Image
Yarik
General
Posts: 1031
Joined: Thu Jan 09, 2003 7:12 pm
Contact:

Post 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
Skype: Yarik_usa
www.skype.com <---free pc2pc phone
Image
Post Reply