How to make the enemys talking?!

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Lillemann1993
Lance Corporal
Posts: 10
Joined: Thu Dec 11, 2008 4:46 pm

How to make the enemys talking?!

Post by Lillemann1993 »

Do you guys know how to make two enemys talk to each other?

Hope you can help me I'm really need this :D
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

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
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
Lillemann1993
Lance Corporal
Posts: 10
Joined: Thu Dec 11, 2008 4:46 pm

Post by Lillemann1993 »

$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
Thank you, but where should I write this in my scr?
And... the ai's... do I need a targetname of them?

Give little more info please :) I'm not so good at scripting
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

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...

Code: Select all

Thank you, but where should I write this in my scr? 
Well, you're the guy making the AI script, you tell me when you want them to talk ;) 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!
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
Lillemann1993
Lance Corporal
Posts: 10
Joined: Thu Dec 11, 2008 4:46 pm

Post by Lillemann1993 »

$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...

Code: Select all

Thank you, but where should I write this in my scr? 
Well, you're the guy making the AI script, you tell me when you want them to talk ;) 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!
Well... you can make the choise what they are going to talk about :wink:
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

Are you making a test script or something? I can't tell you what you should do.
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
Lillemann1993
Lance Corporal
Posts: 10
Joined: Thu Dec 11, 2008 4:46 pm

Post by Lillemann1993 »

$oldier Of Ra wrote:Are you making a test script or something? I can't tell you what you should do.
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.

If you know a tutorial site to do this, please send me.

Well. that is that I wanna know
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

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...
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
Lillemann1993
Lance Corporal
Posts: 10
Joined: Thu Dec 11, 2008 4:46 pm

Post by Lillemann1993 »

$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...
I'm a good scripter, I've maked patrols, objectives, undercover, moving tanks etc...

Hmm... it's maybe better you get my MSN or somthing?

lillemann1993@hotmail.com
Aprop
Major
Posts: 291
Joined: Mon Nov 17, 2008 3:40 pm

Post by Aprop »

Make 2 soldiers and trigger multiple near them, thread this AFTER spawn

If those dialogs are not loaded you need to open ubersound/uberdialog.scr, find they aliases "dfr_M3L3_332i " and write in aliases line your map name, or part of it for example change

Code: Select all

m3l2 
to

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

//============================================================//


Post Reply