User Tag List

Results 1 to 3 of 3

Thread: Get average of multiple objects alt.val

  1. #1
    Clicker Fusion 2.5iOS 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)Universal Windows Platform Export Module (Steam)
    SolarB's Avatar
    Join Date
    Feb 2012
    Location
    Melbourne
    Posts
    904
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Get average of multiple objects alt.val

    I have lots of objects with individual stats and I want a readout of an average of an overall stat, ie 500 npcs with different happiness levels and a counter for overall happiness.

    I know it can be done with on each loops but this is highly inefficient across many objects and more than one alt.value. I would prefer to be able to update these overall stats in real time.

    Does anybody know of an alternative or an extension that would do this? Something like Select Object but with such a function. I assume this data is held in a table somewhere and should be accessible.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    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)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,530
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    Every time you change a value you could add/subtract from a central counter (or equivilant) the difference in happiness level, then you could divide that by the number of NPCs to get the average. Seems like a lot of work and I don't know the resource implications, tho (it depends on your game).

    Alternatively, you could make the average update loop run less often, e.g. set a flag to show something has changed and then check for it in the last event to see if anything has altered the averages that cycle.
    .:::.Joshtek.:::.

  3. #3
    Clicker Fusion 2.5iOS 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)Universal Windows Platform Export Module (Steam)
    SolarB's Avatar
    Join Date
    Feb 2012
    Location
    Melbourne
    Posts
    904
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Excellent, thanks!

Similar Threads

  1. multiple Q - inventory ext :: stop anim frame :: global objects :: loading objects
    By everlite in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 17th March 2014, 09:52 AM
  2. Multiple PMOs for multiple Objects
    By Blood_Wist in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 31st May 2008, 01:49 AM
  3. Multiple PMOs for multiple Objects example
    By Blood_Wist in forum File Archive
    Replies: 1
    Last Post: 31st May 2008, 01:48 AM
  4. Sum (multiple alt values, multiple objects)
    By Melvin in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th April 2007, 02:00 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
  •