recording speech
Moderator: Event DM
- NoneOf Seven
- Knight of Useless Drivel
- Posts: 50
- Joined: Mon May 26, 2003 8:19 am
- Location: in your shadow
recording speech
following scenario:
Person A is in one location, Person B in another (may be the same area, but probably a different room.
A talks into a hole in the wall, wheras B listens to the other side of the hole.
I want this talk "transmitted" to B's location, and be "spoken" there.
so I need a few hints on how to
a) pick up any talk in one location
b) have it output elsewhere (which is probably the easier part)
Person A is in one location, Person B in another (may be the same area, but probably a different room.
A talks into a hole in the wall, wheras B listens to the other side of the hole.
I want this talk "transmitted" to B's location, and be "spoken" there.
so I need a few hints on how to
a) pick up any talk in one location
b) have it output elsewhere (which is probably the easier part)
the dark shadow, created by the light.
I am none, but all
I am none, but all
- maxinion
- Team Member; Retired with Honors
- Posts: 2778
- Joined: Mon Mar 17, 2003 7:44 pm
- DM Avatar: Andrinor
- Location: Bay Area, CA
- Contact:
hmmm... not sure exactly how to do this. picking up the speech is the hard part, as I dont' know how to do it... I know Shadowlords 3, the module, had a feature like this, in the beginning of the dungeon (its one big dungeon). You could probably just jack that part of the script for parsing the text. To get the peephole effect, make clicking on the hole set a variable, and when they leave the area or soemthing, change it back to normal. Have the above script run if and only if the variable is set to true. Then have the peephole object SpeakString() the text which you got through the previous script.
-
- Squire of Babble
- Posts: 26
- Joined: Sat Apr 05, 2003 8:35 pm
- NoneOf Seven
- Knight of Useless Drivel
- Posts: 50
- Joined: Mon May 26, 2003 8:19 am
- Location: in your shadow
- NoneOf Seven
- Knight of Useless Drivel
- Posts: 50
- Joined: Mon May 26, 2003 8:19 am
- Location: in your shadow
That does actually sounds feasible.
So I have to combine the following ingredients:
An invisible NPC that has a listenening pattern and thus is able to record the spoken words.
A trigger that activates said NPC
A means of outputting the recorded words, for instance by another invisible NPC, or by FloatingTextOnCreature or similar.
Now I Just need to find a tutorial on listening patterns...
Thank you !
So I have to combine the following ingredients:
An invisible NPC that has a listenening pattern and thus is able to record the spoken words.
A trigger that activates said NPC
A means of outputting the recorded words, for instance by another invisible NPC, or by FloatingTextOnCreature or similar.
Now I Just need to find a tutorial on listening patterns...
Thank you !
Okay, when you come up with the answer to this. Post it here so i can use it in my own house. Sounds dopeThat does actually sounds feasible.
So I have to combine the following ingredients:
An invisible NPC that has a listenening pattern and thus is able to record the spoken words.
A trigger that activates said NPC
A means of outputting the recorded words, for instance by another invisible NPC, or by FloatingTextOnCreature or similar.
Now I Just need to find a tutorial on listening patterns...
Thank you !
- Jordicus
- Team Member; Retired with Honors
- Posts: 8042
- Joined: Tue Jan 21, 2003 3:46 pm
- Location: Whitehall, PA (GMT -4)
- Contact:
this is a start...
http://www.reapers.org/nwn/reference/co ... umber.html
Here might be a good script to download and disect
http://nwvault.ign.com/Files/scripts/da ... 0342.shtml
http://www.reapers.org/nwn/reference/co ... umber.html
Here might be a good script to download and disect
http://nwvault.ign.com/Files/scripts/da ... 0342.shtml
- NoneOf Seven
- Knight of Useless Drivel
- Posts: 50
- Joined: Mon May 26, 2003 8:19 am
- Location: in your shadow
Thank you for the pointers.
I think I have an idea for the script so that it listens to every sentence.
the combination of
should do the trick.
Pity that there doesn't seems to be any function that returns the whole line that was said, but only the substring that fits the search pattern. If someone knows one, please direct me to it...
(the scribe from the bulletin board seems to be an ideal object to dissect. Does anybody have his script at hand ?)
I think I have an idea for the script so that it listens to every sentence.
the combination of
Code: Select all
SetListeningPattern
SetListening
GetMatchedSubstring
Pity that there doesn't seems to be any function that returns the whole line that was said, but only the substring that fits the search pattern. If someone knows one, please direct me to it...
(the scribe from the bulletin board seems to be an ideal object to dissect. Does anybody have his script at hand ?)
the dark shadow, created by the light.
I am none, but all
I am none, but all
This is a relatively interesting idea, so I scripted this up. Unfortunately, it does have one drawback. In order to get an object to call an on conversation event, that object needs to be a creature (i.e. placeables can't hear stuff). This isn't a huge deal, as you can still give it a null body and give it no name. Unfounately, if the player hits tab or mouses over it, mouse tip feedback will hover Uninjured over the creature's head. Like I say, not a huge deal, but players will realize something is up ooc. anyways, if you want to use the script, I put it into erf format and uploaded it to my homepage at:
http://homepage.usask.ca/~mtm685/NWN/peephole.erf
Follow the instillation instructions to use it.
http://homepage.usask.ca/~mtm685/NWN/peephole.erf
Follow the instillation instructions to use it.
-
- Squire of Babble
- Posts: 26
- Joined: Sat Apr 05, 2003 8:35 pm
- NoneOf Seven
- Knight of Useless Drivel
- Posts: 50
- Joined: Mon May 26, 2003 8:19 am
- Location: in your shadow
-
- Squire of Babble
- Posts: 26
- Joined: Sat Apr 05, 2003 8:35 pm
Or just spawn it invis. Or make it sneak on spawn, which would cut out the lower level floaty eyes (see invis). I really need to type more clearly
Last edited by Yen-lo Wang on Sat Jun 14, 2003 12:57 am, edited 1 time in total.
Just wondering, i didnt test it yet. But when i implemented the .erf file, it said i needed to change the taggs. Im not sure i understand, did you script it so that if only the tags match then they will be connected ?
So all i acctually have to do is come up with tags like your description and they will be connected, then i am free to change the names so perhaps 1 of the speakers is named "Livingquarters" so i know what im hearing from where?
Also about onspawn hide/movesilently, how do i make that work?
And this last part, do i need a genetric trigger in order to spawn/make the speaker and listener work ?
Im no scripter, just wanted to clarify this.
And great work btw, fancy scripts own bad
So all i acctually have to do is come up with tags like your description and they will be connected, then i am free to change the names so perhaps 1 of the speakers is named "Livingquarters" so i know what im hearing from where?
Also about onspawn hide/movesilently, how do i make that work?
And this last part, do i need a genetric trigger in order to spawn/make the speaker and listener work ?
Im no scripter, just wanted to clarify this.
And great work btw, fancy scripts own bad
I've come up with some questions.
1. I will make the listeners visible, and have them standing about and have a conversation to initiate. So they say something like "This is the guestquarters".
So now i don't have to conceal them. But i had some problems with the conversation, i could'nt make them as usuall. He didnt initiate the conversation even though i clicked on him..
2. Is it possible to have the speakers say what is beeing said in the other room without having to talk to them to initiate it?
3. Can my speakers be scripted so they give a message when something enters their line of sight. So they say something like : "We have guests in the livingquarters"?
edit:
4. How do i change the way the speakers present what is beeing said?
My rooms are not adjecant, so it's not suiting that it says: "you hear <blablabla> in the next room"
1. I will make the listeners visible, and have them standing about and have a conversation to initiate. So they say something like "This is the guestquarters".
So now i don't have to conceal them. But i had some problems with the conversation, i could'nt make them as usuall. He didnt initiate the conversation even though i clicked on him..
2. Is it possible to have the speakers say what is beeing said in the other room without having to talk to them to initiate it?
3. Can my speakers be scripted so they give a message when something enters their line of sight. So they say something like : "We have guests in the livingquarters"?
edit:
4. How do i change the way the speakers present what is beeing said?
My rooms are not adjecant, so it's not suiting that it says: "you hear <blablabla> in the next room"
I'll answer a few of these questions, though this is probally going to be about as much support as I give this thing. There is also a new version of the file up which includes the improved invis on spawn and moves some code in the on user defined event to make it more modular. It works exactly the same though.
______________________
NoneOfSeven: You were definately on the right track, this is just a little boost to give you an example of how to hurry it along. As for your question.
In the onspawn script (mm_9_peephole), attach the following line to make the listener have improved invis, then recompile... or download the new version in which I already did that.
As for sneak on spawn, I did select that setting, and maxed out its hide and sneak skills, but it doesn't sneak for some reason. Not a big deal though.
For Dhalmoh:
I'll answer a few of your questions, but I'd recommend getting a bit mroe familiarity with the toolset and the scripting language (C-based). There are a lot of examples at NWVault, and the NWNLexicon has a great function reference. By examining Vault scripts, you can probally get ideas how to do a lot of what you're looking at. Now for the answers.
To link the two, the tags after the first _ must match (i.e. PHD_anythingunique and PHS_anythingunique). I figured that your name would be a good suggestion because each tag pair must have a unique ending. As for the Name field, the name can be absolutely anything that you want. Keep in mind that vanor will probally charge a fair bit for these peep holes.
You currently don't have to either npc to initiate the transfer. Just give the game engine a few seconds after the module starts to load all the tiles, placeables, and creatures. After that it will start handling events.
To change how the voices are reported, simply open the script file "mm_od_peephole". Near the bottom, you'll see text that says "You hear muted voices from the next room" - simply change that to whatever you want it to read.
To get changes to take effect, such as attching a conversation, be sure to Update Instances if you made the changes to the blueprints.
Finally, to make them work, just place an instance of each in your module and link the tags as described above. No triggers or anything like that.
______________________
NoneOfSeven: You were definately on the right track, this is just a little boost to give you an example of how to hurry it along. As for your question.
In the onspawn script (mm_9_peephole), attach the following line to make the listener have improved invis, then recompile... or download the new version in which I already did that.
Code: Select all
// Insert this at the bottom of the file right after the SetListening line
ApplyEffectToObject(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectInvisibility(INVISIBILITY_TYPE_IMPROVED)),OBJECT_SELF);
For Dhalmoh:
I'll answer a few of your questions, but I'd recommend getting a bit mroe familiarity with the toolset and the scripting language (C-based). There are a lot of examples at NWVault, and the NWNLexicon has a great function reference. By examining Vault scripts, you can probally get ideas how to do a lot of what you're looking at. Now for the answers.
To link the two, the tags after the first _ must match (i.e. PHD_anythingunique and PHS_anythingunique). I figured that your name would be a good suggestion because each tag pair must have a unique ending. As for the Name field, the name can be absolutely anything that you want. Keep in mind that vanor will probally charge a fair bit for these peep holes.
You currently don't have to either npc to initiate the transfer. Just give the game engine a few seconds after the module starts to load all the tiles, placeables, and creatures. After that it will start handling events.
To change how the voices are reported, simply open the script file "mm_od_peephole". Near the bottom, you'll see text that says "You hear muted voices from the next room" - simply change that to whatever you want it to read.
To get changes to take effect, such as attching a conversation, be sure to Update Instances if you made the changes to the blueprints.
Finally, to make them work, just place an instance of each in your module and link the tags as described above. No triggers or anything like that.
edited:
ok, these are the remaining questions.
I got all the things you said to work
I'd like to make a teleportation script.
Let me explain..
In my stronghold, i have one room that has a quest-door and only 1 tile circle.
In there i can hear what is beeing said around the house. Also i have a NPC helmethorror there, that i want to be able to transport me to various locations. (4 in all)
But also, inside my stronghold, i want to have two pressureplates or something else that i can step on and get transported to the room with the helmethorror.
It's very important that these plates check for the key, that should be fairly easy? Onuse check for the key and then autolock after ?
Can i be given some pointers. Or just make the .erf and send me, after this im going to be done...
ok, these are the remaining questions.
I got all the things you said to work

I'd like to make a teleportation script.
Let me explain..
In my stronghold, i have one room that has a quest-door and only 1 tile circle.
In there i can hear what is beeing said around the house. Also i have a NPC helmethorror there, that i want to be able to transport me to various locations. (4 in all)
But also, inside my stronghold, i want to have two pressureplates or something else that i can step on and get transported to the room with the helmethorror.
It's very important that these plates check for the key, that should be fairly easy? Onuse check for the key and then autolock after ?
Can i be given some pointers. Or just make the .erf and send me, after this im going to be done...
Important.
I have made the pressureplates that teleport me, i used a generic trigger with a waypoint where i wanted to go. And got a friend to make me that script. Now all i would like is for that trigger only to trigger when i carry a spesific key....
here is what i got so far:
I have made the pressureplates that teleport me, i used a generic trigger with a waypoint where i wanted to go. And got a friend to make me that script. Now all i would like is for that trigger only to trigger when i carry a spesific key....
here is what i got so far:
So where do i put the part that only triggers if it the "last used by" returns true when it comes to carrying a key?void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
AssignCommand(oPC, ClearAllActions());
object oTarget;
oTarget = GetWaypointByTag("Destination");
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToObject(oTarget)));
oTarget = oPC;
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
}
- JollyOrc
- Elder Sage
- Posts: 3984
- Joined: Fri Jan 17, 2003 11:41 am
- Timezone: Europe, CE(S)T
- Location: Germany
- Contact:
you do need to insert a check if the oPC object has the specified key in his inventory. Don't know the exact function for it, but it should look something like:
Code: Select all
if HasItemInInventory("tag_of_key_as_string", oPC)
{
//insert script to teleport here
}
else
{
//nothing happens
}
This is what i got sofar, with help. It works great, i put it on use on a Pressure plate instead of the generic trigger.void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
if (GetItemPossessedBy(oPC, "MasterKey")== OBJECT_INVALID)
return;
AssignCommand(oPC, ClearAllActions());
object oTarget;
oTarget = GetWaypointByTag("Destination");
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToObject(oTarget)));
oTarget = oPC;
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
}
But i have one problem, as you see it's delayed 1 sec. I would like to put an effect on my waypoint after 1 sec. So when i step on the pressureplate i get unsummon effect. And then i get summon monster on the destination, shouldnt that work ?
- Mistcaller
- Team Member; Retired with Honors
- Posts: 5477
- Joined: Sun Feb 09, 2003 3:42 pm
- Location: Athens, Greece (GMT +2)
-
- Apprentice Scholar
- Posts: 530
- Joined: Fri Feb 28, 2003 2:38 pm
- Location: Madison, WI, USA (GMT -5 or -6)
- Contact:
- Mistcaller
- Team Member; Retired with Honors
- Posts: 5477
- Joined: Sun Feb 09, 2003 3:42 pm
- Location: Athens, Greece (GMT +2)