Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Tue 29/04/2014 07:07:55

Title: Voice [n] in regards of player active inventory used...
Post by: Slasher on Tue 29/04/2014 07:07:55
Hi,

I'm taking a long shot by asking if it's possible to play the correct &[n] voice depending on Active Inventory used?
Code (ags) Select
   
cCharles.Say("Mm, %s. I don't think that will be any good. If I can just short circuit the electrics.", player.ActiveInventory.Name);


Waiting with baited breath ;)

Title: Re: Voice [n] in regards of player active inventory used...
Post by: Ghost on Tue 29/04/2014 10:12:30
Nope, sorry. The %s just allows you to insert a substring. No checks are made if that string is a filename, and should be played instead.

_
edit:
It WOULD be a pretty awesome feature, though!
Title: Re: Voice [n] in regards of player active inventory used...
Post by: Scavenger on Tue 29/04/2014 12:11:07
If you use sound clips instead of speech clips, you can use AudioClip.PlayQueued () to line up sounds to play. Then you could, for instance, have "Mm", "<Inventory item>" and "I don't think that will be any good." played one after another.

It seems the best way to handle this with the limitations of the engine is to record one line which says: "Mm, no, I don't think that will be any good. If I can just short circuit the electrics.". The addition of the inventory item's name doesn't add much in this instance.
Title: Re: Voice [n] in regards of player active inventory used...
Post by: Slasher on Wed 30/04/2014 10:49:24
Hi,

cheers guys ;)

I had a feeling I would have to go about it in a different way (nod)

Ghost:
QuoteIt WOULD be a pretty awesome feature, though!

It would be good to have that option implemented in later versions yes (nod)
And while I'm at it: Label 'Strikeouts' also (laugh)