User Tag List

Results 1 to 10 of 10

Thread: Spread value 0 or 1?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Spread value 0 or 1?

    I just ran into a case where using a spread value of 0 causes a bug, but using a spread value of 1 does not. Can anyone explain what other side effects might be caused from using a spread value of 1? I thought they just controlled whether the index of an object was base-1 or not.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid 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)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Spread value 0 or 1?

    Yes, it only controls which value to start on. If you have 3 objects and spread value 1, they get 1,2 and 3.

    What kind of bug does it cause? My guess is that it probably has something to do with your other events.

  3. #3
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Spread value 0 or 1?

    If you spread the value 5 then the first object will have a value of 5, the second will have a value of six; and so on.

    If there is a problem when spreading value 0 it's probably because you have involved an object/extension which works in base one; such as 'list'.

    opps popcorn beat me :grin:

  4. #4
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Spread value 0 or 1?

    Remember to check the the ordering of your actions.

  5. #5
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Spread value 0 or 1?

    I would imagine that the problem is that one of your objects isn't effected by the actions that the rest are. As Seele mentioned, its because of the whole "base 1" thing, which means an object, or several objects have a one based index. MMF2's built-in fast loops have a zero-based index, meaning the first loop is 0. Objects like the list object and the string parser are by default 1-based, but have a checkbox to make them 0-based. Personally, I prefer 0-based indexes, because I use fastloops in most of my games, and it can be annoying to have to add +1 to everything to make sure it works right.

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Spread value 0 or 1?

    I am not too sure why it is affecting my file so much. Can anyone take a look:
    file

    Just change the first line "Always" to spread a value of 1.

    When you run the game, one tree is picked at random and should fire a single volley. Then another tree is picked and it will fire a single volley. Each tree should only fire 3 volleys total. This works great when the spread value is 0. But trees start playing animations without firing if I switch it to spread value 1.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid 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)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Spread value 0 or 1?

    I don't see the problem here.. If I understand you correctly, you change spread value from 0 to 1 without doing changes in the loop events.

    Since in your test you test if loopindex equals enemyID, it tests only the objects with enemyID 0, 1 and 2. When you set the spread value to 1, the objects will have EnemyID 1,2 and 3, and therefore the third one will not be tested in the loop.

  8. #8
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Spread value 0 or 1?

    So, are you saying the loop index is always base-0? I assumed that the spread value told it to be base-0 or base-1.

  9. #9
    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,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Spread value 0 or 1?

    Quote Originally Posted by mobichan
    So, are you saying the loop index is always base-0? I assumed that the spread value told it to be base-0 or base-1.
    The LoopIndex of fast loops are always 0-based. But if you want you can use LoopIndex("foo")+1 in any relevant expression to make it act as if it were 1-based.
    .:::.Joshtek.:::.

  10. #10
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Spread value 0 or 1?

    (makes mental note) Thanks.

Similar Threads

  1. How are spread values spread ?
    By rudy in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 6th December 2011, 08:15 PM
  2. Spread Value
    By FlinkGigitty in forum Multimedia Fusion 2 - Technical Support
    Replies: 25
    Last Post: 1st September 2010, 01:05 AM
  3. spread value help
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 3rd February 2010, 10:53 PM
  4. Spread Value?
    By ZayLong in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 10th August 2008, 02:46 AM
  5. Bug - Spread Value
    By Random in forum File Archive
    Replies: 20
    Last Post: 27th February 2007, 10:34 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
  •