Author Topic: CHAIN EXIT and what follows  (Read 868 times)

shaggie

  • Guest
CHAIN EXIT and what follows
« on: May 04, 2005, 08:51:30 AM »
Hello,

Could you please help me with that? It drives me mad...

Code: [Select]
CHAIN
IF ~~ THEN NPC1 20 // dialogue one
   ~Blah blah.~
   == NPC2
   ~Blah?~
   == NPC1
   ~Blah!~
EXIT

IF ~Global("NPCQuest","GLOBAL",7)~ THEN BEGIN 200 // dialogue two
   SAY ~Blaaah!~
   IF ~~ THEN DO ~SetGlobal("NPCQuest","GLOBAL",8)~ REPLY ~Bleh.~ EXIT
END

The CHAIN block and IF ~~ THEN BEGIN dialogue block are separated - the second one isn't a continuation of the CHAIN block. These are two completely different dialogues that appears in different moments of gameplay. Or, I'd rather say - they should. They are just in one .d file, that's it.
When I'm trying to compile the .d file, syntax error appears - "near text: IF" in the line just after the CHAIN's EXIT. I know how to handle with this, if "IF ~~ THEN BEGIN" dialogue is a continuation of the previous dialogue block - but it isn't in this example. I don't want to use CHAIN again, because it's just a simple talk between NPC and character. Also I don't want to change the order of these two dialogues.
Please help me... I know the solution is pretty simple, but it looks like I'm too dumb... :/

Thanks in advance,
--
Shaggie

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: CHAIN EXIT and what follows
« Reply #1 on: May 04, 2005, 08:57:23 AM »
CHAINs have to go after all your IF ~~ THEN blocks, at the end of the file.
"You alone can make my song take flight..."

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: CHAIN EXIT and what follows
« Reply #2 on: May 04, 2005, 09:04:15 AM »
Or, you can use an APPEND statement to get back into the flow of creating normal single states.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

shaggie

  • Guest
Re: CHAIN EXIT and what follows
« Reply #3 on: May 04, 2005, 11:38:47 AM »
Oh, what a relief. It worked. Thank you.

--
shaggie

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: