User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: is there a way to count ALL objects in play area?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,558
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)

    is there a way to count ALL objects in play area?

    I'd like to be able to count how many objects *of any type* are in the play area at any one time. Failing that, I'd at least like to know how many *actives* there are.

    Is there a way to do that? I feel like I might be missing something obvious, but I can't see a way to do it.

    PS - I know the debugger can tell me this, but I need a way to do it through the event editor.

    Cheers

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sparckman's Avatar
    Join Date
    Feb 2011
    Location
    Planet of the Kangaroos
    Posts
    1,396
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Yes there is a way, all you have to do is put all the objects in a qualifier
    example I used. qualifier group.good for this example

    count objects of any type


    count objects of any type.mfa(76.44 KiB)



  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jun 2006
    Location
    Norway
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or you can set the counter to 'always' set to 'Total Objects'.
    You can get this value in the expression editor under the object icon (the cube thingy).

    This will count all objects, including the counter itself.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sparckman's Avatar
    Join Date
    Feb 2011
    Location
    Planet of the Kangaroos
    Posts
    1,396
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Yup you can count the objects like that too, the only problem is that it will also
    include strings, buttons, extensions and counters. Here is an example.



    object count with event.mfa(88.14 KiB)

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,558
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    Sorry Sparckman, but I forgot to mention that I need to be able to do it without qualifiers*.

    Thanks for pointing out the "Total Objects" method (I wasn't aware of it), but it doesn't seem like it will work for objects only in the play area.




    * it's a bit of a long story. But basically, I'm trying to build in an error-checking system for my workflow that will alert me - among other things - if I've placed something in the play area in a hurry and have forgotten to give it an appropriate qualifer. So your proposed method of course won't work, because for it to work it requires that I remember to put qualifiers on everything....but the thing I want to test for is whether I've remembered to do that in the first place. Hope that makes sense.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something like this: "see attached mfa"
    Attached files Attached files

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleFirefly 3D Module
    aenever's Avatar
    Join Date
    Jun 2013
    Posts
    1,554
    Mentioned
    34 Post(s)
    Tagged
    0 Thread(s)
    I can't see how you could do it without qualifiers. Using Sparckman's example you can count just actives by subtracting the amount of the other objects for example :
    always set counter to:
    ( ( ( ( Total Objects ) - NObjects( "String" ) ) - NObjects( "Button" ) ) - NObjects( "Counter" ) ) - NObjects( "Physics - Engine" ) etc.

    Painful to set up initially, yet once you have the code just cut and paste as needed. You already know that unfortunately it counts actives no matter where they are on or off screen.

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleFirefly 3D Module
    aenever's Avatar
    Join Date
    Jun 2013
    Posts
    1,554
    Mentioned
    34 Post(s)
    Tagged
    0 Thread(s)
    Wow Decal, much better solution

  9. #9
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,558
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    Thanks Decal, but that method would have the same problem I mentioned above: It'd only be accurate if I remembered to add a piece that event to every new active I introduce.....which means I can't use it as an error-checking mechanism, since the method itself is prone to error (ie. I might forget to place that event).

    I'm actually surprised that Fusion doesn't seem to have anything like this that simply tests for 'stuff', without you needing to explicitly specify what 'stuff' you're looking for. I would think it'd be useful for a number of purposes. There would be a number of ways you could potentially do it. For example:

    -on each [object of any type]..........
    -is x position of [any active]...........

  10. #10
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,558
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    I've just found some conditions I hadn't seen before, using the "new object" object:

    "pick all objects in a zone"
    "compare to number of objects in zone"

    Surely there's a way to do it using one of these, though I'm not sure how these conditions are supposed to be used.

    Any ideas?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Can see objects placed outside the frame/play area
    By Christian_Wheel in forum HTML5 Export Module 2.5
    Replies: 1
    Last Post: 19th August 2015, 02:04 PM
  2. How to set play area?
    By BalinKingOfMoria in forum Fusion 2.5
    Replies: 1
    Last Post: 4th December 2014, 06:48 PM
  3. Wrapping around play area
    By MangoMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th December 2011, 02:46 AM
  4. Collisions only in play area.
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th September 2009, 09:03 PM
  5. Count instances of object in area
    By Olivier in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th January 2008, 04:11 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
  •