usecode question - global flag

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

usecode question - global flag

Post by agentorangeguy »

While doing some usecode work, I notice that sometimes I cannot get a global flag to be set true during a conversation topic although some actually do get set. The flag numbers should be in the safe range (1000 +) and before the cutoff number. an example

Code: Select all

case "topic"(remove):
               say("@this should set a flag@");
               gflags[FLAG] = true;



I have also used the following format:

Code: Select all


case "topic"(remove):
          if (!gflags[FLAG])
             {
              say("@Flag is now set.@");
              }
              else say("@What I say after flag is set.@");


for some reason, some flags will fire and some wont. As far as I know, there are no overlapping flags.
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Locked