Make the ai say something

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
martijn_NL
Map Reviewer
Posts: 156
Joined: Mon Apr 14, 2003 5:33 pm
Location: The Netherlands
Contact:

Make the ai say something

Post by martijn_NL »

If i want that the ai says something it doesn't work.
Here is the oart of the script that makes the ai say something:
$soldat3 exec global/disable_ai.scr
$soldat3 turnto $halftrack1
$soldat3 lookat $halftrack1
$soldat3 say dfr_T2L1_AP4368

Can someone help me?
Mapping 4 life
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

Firstly are you running the map in SH, as I found that sound listed in SH's uberdialog.scr, silly question I know but...

Secondly, are you getting any errors in your console, its probably a NIL listener error because your syntax look okay.

Thirdly, try checking the targetnames, is the guy saying the phrase actually refered too as $soldat3.
Parts
Sergeant
Posts: 72
Joined: Thu Apr 10, 2003 12:35 pm
Location: UK
Contact:

Post by Parts »

I suspect you are getting an error message in console reading something like no alias defined in Uberdialog.

You need to make sure that the sound you are using is defined as available in the map you are running

so the default entry in the uberdialog looks like this:

alias dfr_T2L1_AP4368 sound/dialogue/Mission_2/Allies/dfr_T2L1_AP4368tm22.mp3 soundparms 1.3 0.0 1.0 0.0 160 2400 dialog streamed subtitle "Halftrack! Barnes, get on the artillery and take it out!" maps "t2l1 "

Note the but at the end. This is saying this sound is only available for maps that start t2l1. If you are adding the AI to a map you are making add the name on the end of the maps entry like:

alias dfr_T2L1_AP4368 sound/dialogue/Mission_2/Allies/dfr_T2L1_AP4368tm22.mp3 soundparms 1.3 0.0 1.0 0.0 160 2400 dialog streamed subtitle "Halftrack! Barnes, get on the artillery and take it out!" maps "t2l1 MYMAP "

or if it's a multiplayer map just add:

alias dfr_T2L1_AP4368 sound/dialogue/Mission_2/Allies/dfr_T2L1_AP4368tm22.mp3 soundparms 1.3 0.0 1.0 0.0 160 2400 dialog streamed subtitle "Halftrack! Barnes, get on the artillery and take it out!" maps "t2l1 obj dm "

Add the updated uberdialog to the pk3 for the map in the unersound folder. Be warned, this may affect other custom maps you have though.
[VS-UK]Capt.Parts[BnHQ]
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

Better to make a new tiki, than overwrite the uberdialog.scr . Or if its an SP map you could get away with prefixing the map test_ , but this will make your map load slower.
User avatar
martijn_NL
Map Reviewer
Posts: 156
Joined: Mon Apr 14, 2003 5:33 pm
Location: The Netherlands
Contact:

Post by martijn_NL »

thank guys, i gonna try that :D
Mapping 4 life
User avatar
Butch
Lieutenant Colonel
Posts: 398
Joined: Fri Jan 24, 2003 11:30 am

Post by Butch »

if its spearhead dialog, you need to put 'anim' not 'say'
PFC.Butch
B Company, 2nd Ranger Battalion
US Army
Post Reply