Aller au contenu

Photo

Defined False Condition?


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Jonathan Seagull

Jonathan Seagull
  • Members
  • 418 messages
Hi all,

So, I have a plot script which includes several defined conditions.  They each check 2 things:  whether a certain character is in the party; and if a certain plot flag has been set.  They all seemed to be working fine, but not I believe I need one that includes a false condition, i.e. that a certain plot flag has NOT been set.

I have it in my script in the following format:

 case CHARACTER_IN_PARTY_AND_FLAG_NOT_SET:
                                                // Check to see if the character is in the party and the plot flag has not been set.            {
                int bCondition1 = WR_GetPlotFlag( PLT_MY_PLOT, CHARACTER_IN_PARTY);
                int bCondition2 = WR_GetPlotFlag( PLT_SECOND_PLOT, SECOND_PLOT_FLAG, FALSE);
                nResult = bCondition1 && bCondition2;
                break;

But that does not seem to be working.  I have the exact same code used for another defined condition; the only thing different is checking for the flag being false (in the other that bit is left out completely, which I assume makes it check for the flag being true).  Am I doing something wrong here?

#2
Proleric

Proleric
  • Members
  • 2 350 messages
!WR_GetPlotFlag will return TRUE if the plot flag is FALSE (not set).

! is the NOT operator in DAScript.

The third parameter of WR_GetPlotFlag determines whether the plot script is called or not. Setting it to FALSE for a defined flag is bad news, because the defined flag will never be calculated.

Modifié par Proleric1, 05 décembre 2010 - 09:54 .


#3
Jonathan Seagull

Jonathan Seagull
  • Members
  • 418 messages
Ah, so I want !WR_GetPlotFlag. Thanks Proleric!