States in script

Post » Fri May 27, 2011 1:27 pm

I'm trying to make dependancies based on if a topic response has been given or not.
What's the best way of doing this?

EDIT: Do I have to make a script for every topic for which I want multiple answers?
User avatar
Floor Punch
 
Posts: 3568
Joined: Tue May 29, 2007 7:18 am

Post » Fri May 27, 2011 1:45 pm

I'm not sure what dependencies you're talking about. Can you provide an example?
User avatar
Danger Mouse
 
Posts: 3393
Joined: Sat Oct 07, 2006 9:55 am

Post » Fri May 27, 2011 10:53 am

A dependancy checking if a topic response has been given or not.

I'm not sure what I'm talking about either! From my understanding, it would work this way.

If "global script" = 1

Give topic response.

Otherwise other response, setting the global script to 1.

This is very blurry in my mind. I'd appreciate some directions.

EDIT: For example; you ask an NPC about tomatoes. It isn't a detail important enough to add to the journal, as is done with most quests. However, I don't want him to repeat the same thing if asked a second time.
User avatar
Kate Murrell
 
Posts: 3537
Joined: Mon Oct 16, 2006 4:02 am

Post » Fri May 27, 2011 12:47 pm

I think you mean variable, not dependency.
You could just use Function->Talked To PC
Set it to 1 for the second response.

This will reset every 72 game hours, but it saves you from having a Global running all the time.
User avatar
Alina loves Alexandra
 
Posts: 3456
Joined: Mon Jan 01, 2007 7:55 pm

Post » Sat May 28, 2011 12:19 am

I think you mean variable, not dependency.

Same thing, in essence.

I thought the Talked to PC function determined whether or not the NPC had talked to the PC. I wasn't aware of it being usable in the same discussion.
User avatar
Big mike
 
Posts: 3423
Joined: Fri Sep 21, 2007 6:38 pm

Post » Fri May 27, 2011 11:58 am

I thought the Talked to PC function determined whether or not the NPC had talked to the PC. I wasn't aware of it being usable in the same discussion.

You're right. I guess it would only work for Greetings. :P
User avatar
sarah simon-rogaume
 
Posts: 3383
Joined: Thu Mar 15, 2007 4:41 am

Post » Fri May 27, 2011 7:47 pm

Make a local variable in the NPC's script called talkedtomatos or something distinctive and check to see if it's zero in dialog. If it is, have the NPC talk about the tomatoes, then set the variable to one. That way, the NPC will only talk about tomatoes once and not repeat himself. :)
User avatar
Spooky Angel
 
Posts: 3500
Joined: Thu Aug 10, 2006 5:41 pm

Post » Fri May 27, 2011 3:39 pm

Make a local variable in the NPC's script called talkedtomatos or something distinctive and check to see if it's zero in dialog. If it is, have the NPC talk about the tomatoes, then set the variable to one. That way, the NPC will only talk about tomatoes once and not repeat himself. :)

Your comment has just deepened my comprehension of the universe we live in -- because local variables are checkable in dialogue.

Possible success and likely failure stories later today.
User avatar
Lavender Brown
 
Posts: 3448
Joined: Tue Jul 25, 2006 9:37 am

Post » Sat May 28, 2011 12:26 am

Your comment has just deepened my comprehension of the universe we live in -- because local variables are checkable in dialogue.

Possible success and likely failure stories later today.

I know, I use them myself for that very purpose. :P
User avatar
Anthony Santillan
 
Posts: 3461
Joined: Sun Jul 01, 2007 6:42 am


Return to III - Morrowind