i30817 Posted December 11, 2011 Posted December 11, 2011 Demorgan laws don't work with OR IF !OR(3) True() True() True() THEN RESPONSE #100 DisplayStringHead(Myself,@8) END Always displays the string, though it shouln't since !( A OR B OR C) == !A AND !B AND !C !True() AND !True() AND !True()
berelinde Posted December 11, 2011 Posted December 11, 2011 IE OR() is a little different The way that reads, it's IF OR(3) !True() !True() !True() THEN RESPONSE #100 DisplayStringHead(Myself,@8) END If you want !True() AND !True() AND !True(), use that, not the OR() block.
i30817 Posted December 11, 2011 Author Posted December 11, 2011 Ah, but i was hoping to use it for a workaround to the flakiness of !HotKey(V) (try it and be amazed at what it matches).
the bigg Posted December 11, 2011 Posted December 11, 2011 Look up REFACTOR_BAF_TRIGGER if you want to apply DeMorgan's law to BG2 scripting: IF !ThisIsNotATrigger() THEN ... COMPILE ~myfile.baf~ REFACTOR_BAF_TRIGGER ~ThisIsNotATrigger()~ ~OR(3) InParty("Imoen") InArea("AR1000") Global("variable","GLOBAL",5) will turn the NOT (A || B || C) into !A && !B && !C.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.