detecting what a pc says
Moderator: Event DM
- girlysprite
- Elder Sage
- Posts: 3659
- Joined: Mon Apr 12, 2004 2:38 pm
- Location: In my little pony ranch
- Contact:
detecting what a pc says
another scripting issue
Can I detect when a pc says 'I disbelieve'. Not in a conversation, but when the player types it.
Can I detect when a pc says 'I disbelieve'. Not in a conversation, but when the player types it.
Gaming doesn't make people voilent, lag does
<Dimotane> I think deep down, when we're honest with ourselves... we're all a pregnant male elf.
<Dimotane> I think deep down, when we're honest with ourselves... we're all a pregnant male elf.
- girlysprite
- Elder Sage
- Posts: 3659
- Joined: Mon Apr 12, 2004 2:38 pm
- Location: In my little pony ranch
- Contact:
I already finished it: let me share
I got an cutscene invisible pixie (which means undetectable by any means)
On the onSpawn script is the listening code
I listens for the sentence 'I disbelieve'
Now, for things to happen, I made another sciprt in onConversation, which also fires if the PC types something.
a fog item appears at a certain waypoint when I say this. Of course, now i realize I have to make set a variable, also have it checked...otherwise too many fogs can spawn if the player repeats the sentence.
I got an cutscene invisible pixie (which means undetectable by any means)
On the onSpawn script is the listening code
Code: Select all
SetListening(OBJECT_SELF,TRUE);
SetListenPattern(OBJECT_SELF,"I disbelieve",2001);
Now, for things to happen, I made another sciprt in onConversation, which also fires if the PC types something.
Code: Select all
void main()
{
int nUser = GetUserDefinedEventNumber();
int nMatch = GetListenPatternNumber();
if(nMatch == 2001)
{
object oTarget;
object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("fog_02");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "zep_fog001", lTarget);
oTarget = GetWaypointByTag("fog_01");
}}
Gaming doesn't make people voilent, lag does
<Dimotane> I think deep down, when we're honest with ourselves... we're all a pregnant male elf.
<Dimotane> I think deep down, when we're honest with ourselves... we're all a pregnant male elf.
sounds neat... when are you going to start making stuff for Avlis, hmm? 
if the PC has true seeing or, in this case, see invis, does the cutscene stuff still show up when they hit tab, as "name/uninjured"? if it does another option might be to make a 'statue' NPC.
anyways, good luck!

if the PC has true seeing or, in this case, see invis, does the cutscene stuff still show up when they hit tab, as "name/uninjured"? if it does another option might be to make a 'statue' NPC.
anyways, good luck!
Ua mau ke ea o ka ina i ka pono.
- girlysprite
- Elder Sage
- Posts: 3659
- Joined: Mon Apr 12, 2004 2:38 pm
- Location: In my little pony ranch
- Contact:
Cut scene invisible can not be detected in any way. Name also doesnt show up. Sounds that an npc emits, like twinkeling from a pixie, can be heard. Also, if the npc is hostile, it will attack, and the invi wont wear off.
Hm, maybe I should indeed apply as builder for avlis.
Hm, maybe I should indeed apply as builder for avlis.
Gaming doesn't make people voilent, lag does
<Dimotane> I think deep down, when we're honest with ourselves... we're all a pregnant male elf.
<Dimotane> I think deep down, when we're honest with ourselves... we're all a pregnant male elf.
- Papainhell
- Sage
- Posts: 2138
- Joined: Wed Oct 01, 2003 1:09 am
- Timezone: Time?
- Location: Kodiak, Alaska (for now)
- Contact:
- girlysprite
- Elder Sage
- Posts: 3659
- Joined: Mon Apr 12, 2004 2:38 pm
- Location: In my little pony ranch
- Contact:
- Sindol
- Team Member; Retired with Honors
- Posts: 6479
- Joined: Mon Jan 06, 2003 4:23 pm
- Location: Nijmegen - Netherlands (GMT+1)
- Contact:
The library is your friend: http://www.avlis.org/viewtopic.php?t=18686.
(Apologies to those folks that don't have access. The Avlis library is only available for team members and subcontractors, apply if you are interested.)
(Apologies to those folks that don't have access. The Avlis library is only available for team members and subcontractors, apply if you are interested.)
So much fun,
yet so little time to enjoy it.
- Sindol
yet so little time to enjoy it.
- Sindol