Results 1 to 5 of 5

Thread: The not keyword

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default The not keyword

    Hey Carl, I found a new problem in vanilla today that needs fixing (as I put it into my tutorial, it reads like this):

    Quote Originally Posted by alpaca
    Be careful when using not. It apparently doesn't work with some conditions that use a logic token (like I_CompareCounter counter = 1).
    If you want to negate these, manually negate the token, so "not condition = 1" would become "condition !=1", "not condition >= 1" would become "condition < 1" and so on.
    I found that using "I_CompareCounter = 1" and "not I_CompareCounter = 1" yields the exact same results. I'm not sure if that's true for all logic_token keywords, but to be sure, they should be changed.

    The problem is that CA uses this kind of syntax with some vanilla triggers, for example:
    Code:
    ;------------------------------------------
    Trigger battle3Dread
        WhenToTest PostBattle
    
        Condition GeneralNumKillsInBattle > 8
              and not Trait BattleChivalry > 0
    
        Affects BattleDread  1  Chance  50 
        Affects Bloodthirsty  1  Chance  10 
        Affects Brave  1  Chance  20
    So I thought I'd just tell you to have a look for that
    Last edited by alpaca; 03-28-2007 at 16:56.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO