Pocket Plane Group
Miscellany, Inc. => Infinity Engine Modding Q&A => Topic started by: Bill Bisco on June 13, 2015, 11:16:28 AM
-
Simple question here. I have a .D file which states the following:
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:
IF ~NumTimesTalkedToGT(0) Global("Erevain_Jerk", "GLOBAL", 1)~ THEN BEGIN 11 // from:
Thanks,
Bill
-
Yes.
I personally put each on a line of it's own because you can see exactly what it is checking for much easily.
-
Great. Thank you and the syntax above is correct? Just a space between the variables?
-
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).