Once a day conversations

For toolset tutorials as well as question and answers.
Locked
User avatar
Teric neDhalir
Githyanki
Posts: 1495
Joined: Mon Jan 05, 2004 10:04 pm
Location: Manchester UK

Once a day conversations

Post by Teric neDhalir »

Hi,
I'm trying to write a conversation that allows the PC to do something only once a day. The convo looks like this;

PC: I want to do something
-----NPC: You can only do that once a day[END].
-----NPC: Go and do it.

-----------PC: Here I am doing it.

I've written a little script that is the Action on the PC "Here I am doing it" node that sets a local variable on the PC with the value of the current game day. Obviously I need to set the condition for the NPC "You can only do that once" node to check whether the date stored in the variable is the same as the current day. What isn't immediately obvious is just who is the "target" of a GetLocalInt call from that node. I'm guessing it's not OBJECT_SELF because that would be the NPC(?) and I don't know the command to find out what the object the NPC is talking to is.

Any ideas?

Thanks in advance,
Teric
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

In a conversation script:

OBJECT_SELF is the NPC.
GetPCSpeaker() returns the PC the NPC is talking to.
User avatar
Teric neDhalir
Githyanki
Posts: 1495
Joined: Mon Jan 05, 2004 10:04 pm
Location: Manchester UK

Post by Teric neDhalir »

ç i p h é r wrote:In a conversation script:

OBJECT_SELF is the NPC.
GetPCSpeaker() returns the PC the NPC is talking to.
See, I knew it would be straightforward. Thanks, Cipher.
Locked