User Tag List

Results 1 to 10 of 10

Thread: Global and alterable values inconsistent.

  1. #1
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    209
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Global and alterable values inconsistent.

    Global value indices are base 0. Alterable value indices are base 1. Curious as to if this is on purpose, since they seem to be directly analogous features. Loops are base 0, which means to use indices with loops, you need to subtract one for every calculation.

  2. #2
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,008
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    I don't understand what you are trying to do. Global Values, Alterable Values and Loops are all 0-based, unless you specify otherwise (minus the loop index) in the value...

  3. #3
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    209
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I got it backwards, sorry. Global values are base 1, alterable values are base 0.

    I'm using global strings as a lookup table for control bindings, and using alterable values of an active object for control firing flags. I transferred this code from a project that used global values instead, and the index of alterable values seems to start from 1, not 0.

    Here's proof: http://i.imgur.com/JZ5dZAz.png I'm displaying global value (1) and it's showing the first global value. It should show the 2nd one to be consistent.

  4. #4
    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,518
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    Fusion is inconsistent between 0-based and 1-based in various places so it is worth paying attention (e.g. with paragraphs in the string object). Unfortunately, changing everything now to be uniform would break old code.
    .:::.Joshtek.:::.

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export Module

    Join Date
    Sep 2006
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's just a mess and you'll have to figure out whether it's zero index or not as you go. The Xbox Joypad object is also inconsistent (within the same object!) regarding Player 1, Player 2, Player 3, etc.

  6. #6
    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,304
    Mentioned
    94 Post(s)
    Tagged
    0 Thread(s)
    Sounds like something that won't be able to fixed until fusion 3.

    Consider using just alterable values attached to global active objects. This is a good way to organise your variables anyway. You can make active objects with names like: player, physics, HUD, movementInput, levelInfo etc. Then store appropriate alterable values in them.

  7. #7
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    209
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I am using active objects where I can, but they only have 10 alterable strings (another issue.) It'd be nice to have a string/key dictionary object for easy and fast data storage. Arrays can hold strings, of course, but they can't name them, so for stuff like keybindings it would get messy. Or, just more alterable strings would do the job, I guess.

  8. #8
    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,304
    Mentioned
    94 Post(s)
    Tagged
    0 Thread(s)
    You could try using something like the List object. I haven't used it, but I believe it can give you access to unlimited strings.

  9. #9
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    209
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I need named string lists, like a dictionary. AFAIK, alterable strings/global strings are the only thing that fill that need.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,117
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    lol this is a classic Fusion 2.5 headache that will thankfully be gone by F3. When dealing with this, if you're looping through whatever index, you can just do "loop index+1" or -1.. it's annoying, but you can work around it.

Similar Threads

  1. Global and Alterable values affecting frameratr
    By Shadeve in forum Fusion 2.5
    Replies: 12
    Last Post: 24th June 2016, 06:01 PM
  2. Global Values & Alterable Values with same names
    By Gustav in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th November 2012, 07:15 PM
  3. Total number of Global Alterable Values question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 16th May 2012, 11:08 PM
  4. Global and Alterable values names
    By Corentin in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 26th February 2007, 12:25 PM
  5. Alterable Strings and Alterable Values limit :(
    By Pedro Almeida in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th October 2006, 07:38 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
  •