User Tag List

Results 1 to 6 of 6

Thread: group data

  1. #1
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    group data

    Is there some way of getting data on group.* contents? Which objects are in which group?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you talking about qualifiers?

  3. #3
    Clicker Multimedia Fusion 2 Developer
    gastrop0d's Avatar
    Join Date
    Dec 2011
    Location
    Australia
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not aware of any direct support for something like that, but you could jury rig a kind of "tagging" system using alterable strings and string parser.

    So like, you have some tagging events like this:

    Flag 0 of Group.Enemy is OFF:
    Set Alt. String A(Group.Enemy) to Alt. String A(Group.Enemy) + "Enemy,"
    Set Flag 0 of Group.Enemy to ON

    Flag 1 of Group.Bullet is OFF:
    Set Alt. String A(Group.Enemy) to Alt. String A(Group.Enemy) + "Bullet,"
    Set Flag 1 of Group.Bullet to ON

    Etc for all the relevant qualifiers. Then when you want to test which qualifiers an object belongs to:

    set$( "String Parser", Alterable String A ( >Some Object< )) + listFind( "String Parser", "Enemy", 1) > 0

    This would check if the Enemy tag is in the string of Some Object and thus if Some Object is in Group.Enemy

  4. #4
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, qualifiers - group.good [and how I wish I could rename them :]

    Interesting idea gastrp0d. At first glance it looks like I have to test each object by name. Hmmm. If there are 100 objects (or more) I would need to auto build a list somehow. I will ponder. Thanks.

  5. #5
    Clicker Multimedia Fusion 2 Developer
    gastrop0d's Avatar
    Join Date
    Dec 2011
    Location
    Australia
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This method avoids any centralised management of group data. It builds the info ground up on a per-object basis. Essentially every object that belongs to any qualifier ends up with, say, alterable string A listing all the qualifiers that object is in. Ie their strings resemble something like this:

    "Enemy,Bullet,PhysicalObject,"
    "Door,ForegroundScenery,Neutral,"
    etc

    The first 2 events in my previous post were examples of events that help build these little lists. You would need such an event for each qualifier you need to consider. Each one would poll its own flag of the object. The flags track whether we have added that particular qualifier to the personal list of the object (flag 0 for Enemies, flag 1 for Bullets in the example).

    String parser breaks these strings up based on where the commas are placed and treats them as lists. Then it iterates through that list and looks for the key you feed it (in the example in my previous post the key was "Enemy"). The neat thing is it does all of this in a single condition:

    set( "String Parser", Alterable String A ( >Some Object< )) - This tells string parser to use Some Object's alterable string A as the string to parse. EDIT: Sorry there is a small error in my previous post, I wrote set$ instead of set. The different is set$ returns an empty string, set returns 0. The idea is you can put this in an expression and just add it to the rest of the expression and it has no effect on it - it's sole purpose is to update the source string of string parser INSIDE a condition.
    listFind( "String Parser", "Enemy", 1) - This iterates through the given string and looks for the key "Enemy". If it finds the key it returns the position in the list of the key, so if we see if this value is greater than 0 it must mean the list contains the key SOMEWHERE in there, thus Enemy must be one of the qualifiers the object belongs to.

    To reiterate, you are testing for the existence of "tags" - string keys in a list that is built for the object based on what qualifiers the object belongs to.

    I hope I've explained that well enough.

  6. #6
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A very generous reply gastrop0d - thanks.
    I will see if I can turn it into a working model.

    Any chance that you already have one?

Similar Threads

  1. Replies: 17
    Last Post: 10th July 2013, 01:46 PM
  2. SQL Group Inside of a Group?
    By Ausomeman in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th January 2011, 04:18 PM
  3. using binary data at data elements
    By Chokito in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th August 2008, 05:22 AM
  4. Group bug?
    By Jarzka in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 7th July 2008, 06:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •