Author Topic: Simple Question: D file Dialog multiple requirements  (Read 3599 times)

Offline Bill Bisco

  • Planewalker
  • *****
  • Posts: 30
Simple Question: D file Dialog multiple requirements
« on: June 13, 2015, 11:16:28 AM »
Simple question here.  I have a .D file which states the following:

Code: [Select]
IF ~NumTimesTalkedToGT(0)
Global("Erevain_Jerk", "GLOBAL", 1)~ THEN BEGIN 11 // from:

Now, from experience, I can tell that it checks for both of these variables.  The Number of Times Talked to must be more than 0 and the Erevain_Jerk global must be 1.  Can the code be written such that both requirements are on one line of code?

For example:

Code: [Select]
IF ~NumTimesTalkedToGT(0) Global("Erevain_Jerk", "GLOBAL", 1)~ THEN BEGIN 11 // from:
Thanks,

Bill

Offline CrevsDaak

  • big kid lil' orc
  • Planewalker
  • *****
  • Posts: 48
  • Gender: Male
  • duuuh graah
Re: Simple Question: D file Dialog multiple requirements
« Reply #1 on: June 16, 2015, 07:28:40 PM »
Yes.

I personally put each on a line of it's own because you can see exactly what it is checking for much easily.

Offline Bill Bisco

  • Planewalker
  • *****
  • Posts: 30
Re: Simple Question: D file Dialog multiple requirements
« Reply #2 on: June 16, 2015, 10:45:55 PM »
Great.  Thank you and the syntax above is correct?  Just a space between the variables?

Offline CrevsDaak

  • big kid lil' orc
  • Planewalker
  • *****
  • Posts: 48
  • Gender: Male
  • duuuh graah
Re: Simple Question: D file Dialog multiple requirements
« Reply #3 on: June 19, 2015, 06:24:36 PM »
Thank you and the syntax above is correct?
Your welcome. I guess it is (I'm not a parser but hey). You can omit the THEN if you want.
Just a space between the variables?
Variables within the Infinity Engine shouldn't have spaces AFAIK (In your script there are two variables being checked--a LOCAL (to the creature running that is being talked to) is used by NumsTalkedTo, but I won't get on that--and the Erevain_Jerk variable, this one's alright since it doesn't have a space). Also mind that variables inside the engine aren't case sensitive (dunno how the BAF->BCS compiler handles it, but I guess it just puts them in caps).

 

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)?: