Checking a bunch of tags at once

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Gizmog
Metal King Slime
Posts: 2622
Joined: Tue Feb 19, 2008 5:41 am

Checking a bunch of tags at once

Post by Gizmog »

Someone in IRC asked and its easier to explain here than there, so here's how I would do it:

Code: Select all

script,DoSomething,Begin
if (TheTags)
then (#Whatever)
end

script,TheTags,begin
if (CheckTag (WhicheverTag))
then (ExitReturning (False))
if (Checktag (WhicheverOtherTag))
then (ExitReturning (False))

#If the tags are sequential, you can get fancy and do it with a for loop
variable (WhichTag)
for (WhichTag,FirstTag,LastTag)
do (
     if (CheckTag (WhichTag))
     then (ExitReturning (False))
     )
)
ExitReturning (True)
end
Post Reply