• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Count if things share a tag

Illyahr

Well-known member
I'm trying to come up with the coding to allow me to check the tags of a special. The scripting needs to cycle through all custom specials and find their tags. If there are three of the same tag, then check +1 for each group of three.

Is this doable?
 
Something like this might help you out:

Code:
var tagexist as number

foreach pick in BaseCustSp
  if (eachpick.tagis[Custom.Tag] <> 0) then
     tagexist += 1
  endif
nexteach

tagexist = round(tagexist/3,0,-1)

This should provide a result equal to the number of "groups of three" you are looking for.
 
Back
Top