getting a champion to say a line of text

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
kelly11
Posts: 17
Joined: Mon Oct 08, 2012 12:30 am

getting a champion to say a line of text

Post by kelly11 »

Hello People... Does anyone know how I can make a script that targets a champion to say something. that get's a champions name and then prints that name followed by the sentence?

Thanks in advance
User avatar
Jgwman
Posts: 144
Joined: Thu Jun 28, 2012 10:14 pm

Re: getting a champion to say a line of text

Post by Jgwman »

Code: Select all

hudPrint(party.party:getChampion(x):getName() .. ": message you want the champion to say in quotes here" )
In a lua script function called by whatever event you want to trigger it.
Where x is the index of the champion by location according to
1 2
3 4
kelly11
Posts: 17
Joined: Mon Oct 08, 2012 12:30 am

Re: getting a champion to say a line of text

Post by kelly11 »

Thanks !
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: getting a champion to say a line of text

Post by Drakkan »

Jgwman wrote:

Code: Select all

hudPrint(party.party:getChampion(x):getName() .. ": message you want the champion to say in quotes here" )
In a lua script function called by whatever event you want to trigger it.
Where x is the index of the champion by location according to
1 2
3 4
are you able somehow make text to appear for example in the top of the screen instead in the bottom ?
Breath from the unpromising waters.
Eye of the Atlantis
User avatar
Jgwman
Posts: 144
Joined: Thu Jun 28, 2012 10:14 pm

Re: getting a champion to say a line of text

Post by Jgwman »

Not that we know of yet, but obviously the scripting reference isn't out yet.
kelly11
Posts: 17
Joined: Mon Oct 08, 2012 12:30 am

Re: getting a champion to say a line of text

Post by kelly11 »

dont know how to do that. Do you by now?
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: getting a champion to say a line of text

Post by Komag »

You could always set it up with GUI text, a ton more work, but almost anything becomes possible
Finished Dungeons - complete mods to play
Post Reply