Zoerkus Posted November 2, 2020 Share Posted November 2, 2020 I'm aware of how to check if CHARNAME has already spoken to a NPC: IF ~NumTimesTalkedTo(0)~ THEN BEGIN 0 SAY ~Behold <CHARNAME>. Before you is the great Mendak, champion of the people of Cormyr, slayer of the dragon of the Great Mountain.~ ++ ~May I ask what brings you to Candlekeep?~ GOTO 2 +~Global("IZDagger","GLOBAL",2)~+ ~I got that dagger identified. Looks like its cursed.~ GOTO 4 ++ ~My apologies, I didn't mean to disturb you.~ EXIT END Now, I'm also aware of how to make the check for if CHARNAME has indeed spoken to NPC: IF ~NumTimesTalkedToGT(0)~ THEN BEGIN 1 SAY ~<CHARNAME> and his merry band of adventurers, hello again!~ ++ ~May I ask what brings you to Candlekeep?~ GOTO 2 +~Global("IZDagger","GLOBAL",2)~+ ~I got that dagger identified. Looks like its cursed.~ GOTO 4 ++ ~My apologies, I didn't mean to disturb you.~ EXIT END This means I've to have two identical conversation blocks, once for the 1st encounter, and once for all following. The only difference is the SAY statement for the 1st greeting vs the subsequent. I assume this is error prone. I've had a look at a couple of files decompiled via NearInfinity but there's very heavy state usage and I'm not quite getting it. Is there a 'standard' approach for NPC interaction with something like first greeting, set a var, followup activities that avoids the re-copying of conversation logic? Thanks again! Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.