How to make the enemys talking?!
Posted: Thu Dec 11, 2008 8:24 pm
Do you guys know how to make two enemys talk to each other?
Hope you can help me I'm really need this
Hope you can help me I'm really need this
MoHAA Mapping
http://map.moh-central.net/forum/
Thank you, but where should I write this in my scr?$oldier Of Ra wrote:To make it more natural you can make the actors look at eachother with this:
$actor lookat $actor2
and even the eyes:
$actor eyeslookat $actor2
Make him say something with his lips moving etc:
$actor say <dialogue_alias>
This could be useful, it stops the script until the dialogue-sound and animation are done:
$actor waittill saydone
Code: Select all
Thank you, but where should I write this in my scr? Well... you can make the choise what they are going to talk about$oldier Of Ra wrote:Well unless you spawned them locally (local.example_actor) or you spawned them levelwide (level.example_actor) otherwise if you spawned them in radiant; you need a targetname so you can tell the game to who you cast these commands
I was under the impression you were good at scripting, since you made a tutorial about AI patrolling...
Well, you're the guy making the AI script, you tell me when you want them to talkCode: Select all
Thank you, but where should I write this in my scr?I know AI scripting is all about timing and sequence, so do this at the moment you want the AI to talk.
If you made them patrolling or doing something at that time, make them stop it and make them walk to eachother and then start scripting the conversation.
You'll find all dialogue aliases (with their subtitles) in the ubersound/uberdialogue.scr in pak0.pk3
Good luck!
You know? I've maked a test map whit two ai's and I want them to talk about somthing to eachother and I want to know what the targetnames has to be on the ai's and what the script is to make them talk.$oldier Of Ra wrote:Are you making a test script or something? I can't tell you what you should do.
I'm a good scripter, I've maked patrols, objectives, undercover, moving tanks etc...$oldier Of Ra wrote:Well did you give them a targetname when you made that testmap in radiant? If not then open your .map give them targetname and recompile and use those targetnames.
I already told you how to make them talk in one of my previous posts. If you barely know how to script then according to my opinion, AI isn't a place to start. You should start with simple entity scripting, like spawning an object and moving it etc...
Code: Select all
m3l2 Code: Select all
m3l2 test
Code: Select all
scene7_dialogue:
wait 2
level.ramsey = $targetname1
level.cobb = $targetname2
$trigger waittill trigger
//*** Scene7 Dialog - Snipers in the Silo
level.cobb turnto level.ramsey
level.cobb lookAt level.ramsey
level.cobb say dfr_M3L3_332i
// "Private Cobb, 3rd of the five-oh-sixth, sir."
level.cobb waittill saydone
wait 1
level.ramsey turnto level.cobb
level.ramsey lookAt level.cobb
level.ramsey say dfr_m3l3_333j
// "Private Cobb do you have a radio?"
level.ramsey waittill saydone
wait 1
level.cobb turnto level.ramsey
level.cobb lookAt level.ramsey
level.cobb say dfr_M3L3_334i
// "Our squad's radioman...blah blah blah..."
level.cobb waittill saydone
wait 1
level.ramsey turnto $player
level.ramsey lookAt $player
level.ramsey say dfr_m3l3_336j_1.new
// "Powell, you?re the only sniper here. Head for the farm house and flank that sniper.
level.ramsey waittill saydone
wait 1
level.ramsey turnto NULL
level.ramsey lookAt NULL
level.cobb turnto NULL
level.cobb lookAt NULL
end
//============================================================//