User Tag List

Results 1 to 5 of 5

Thread: Count of objects where Alterable Value = n

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2011
    Location
    Beverly Hills, CA USA
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Count of objects where Alterable Value = n

    I would like to get the count of a particular object where the alterable value of a equals let's say 1. I know this is perhaps simple, but I can't seem to figure it out.

  2. #2
    Clicker Multimedia Fusion 2 Developer
    gastrop0d's Avatar
    Join Date
    Dec 2011
    Location
    Australia
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Drop in the ForEach Object, then do something like this:

    Always:
    Set counter to 0
    Start ForEach loop for SomeObject

    On ForEach loop for SomeObject
    + Alterable value A of SomeObject == 1:
    Add 1 to counter

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Or just use the Select Object extension and do it in a single line...

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2011
    Location
    Beverly Hills, CA USA
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there another more generic way that actually works in iOS?

  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)
    Spread value and use a fastloop:

    Always:
    Spread 0 in alterable value B of SomeObject

    Always:
    Start loop "countA" for number of SomeObject loops

    On loop "countA"
    + Alterable value B of SomeObject == loopindex("countA")
    + Alterable value A of SomeObject == 1:
    Add 1 to counter

    This method requires no extensions. Make sure spread value and start loop actions are in separate events and that the spread value event is before the loop start event.

Similar Threads

  1. looking for way to count objects
    By piki in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 25th June 2008, 02:28 AM
  2. strange count alterable value.
    By piki in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 8th June 2008, 12:12 PM
  3. Count the number of Alterable strings
    By Attan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 3rd October 2007, 09:32 PM
  4. Problem: Count Objects
    By Nifflas in forum File Archive
    Replies: 8
    Last Post: 18th March 2007, 06:47 AM

Posting Permissions

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