User Tag List

Results 1 to 5 of 5

Thread: Dynamic Array: any way to make it global?

  1. #1
    No Products Registered

    Join Date
    Jan 2015
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Dynamic Array: any way to make it global?

    Hi Clickers,

    I'm using "Dynamic Array" to store information, but I'd like to make it global somehow. Is there any way to do that?
    I can't just use a standard Array because not only does it not load from CSV files, it also doesn't handle labels. Plus, I've already done a lot of coding using a Dynamic Array and it'd be a pain to refit all the events (including some that involve labels in expressions) for a standard one.

    I'd stick with a Dynamic Array and save/load it to a temporary spot every frame, but this is for a Pokémon-like pet battle game and if the player feels compelled to capture 500 instances of various creatures, for some reason, loading their info repeatedly (instead of on game load) would be annoying. Does the game really have to dump Dynamic Array info between frames?

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,826
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)
    It appears that object doesn't have the global object.
    So I think only option would be some sort of saving between frames and then reloading it.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Seems like a cool project!
    Can't think of other solution than what Jeff said.

    Though you can load CSV in a standard array with some steps inbetween (like some looping and a tokenizer)
    but I can see the convenience of using the Dynamic array
    and unconvenience of changing something you already coded
    very cool object the D.A. (and as fast as a standard array!)
    Images attachées Images attachées

  4. #4
    No Products Registered

    Join Date
    Jan 2015
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you. I suppose that when the player changes areas, I'll start a little loop that saves the inventory, current team and move info to temporary CSVs, and ends with a frame change. I guess that, like in Pokémon games, the info of all the pets I've gathered could just be loaded when I access my PC in whatever will stand for a Pokémon Centre - that means infrequent loads of the giant array.

    Thank you again for answering so quickly!

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Just had a quite awkward idea,
    thought I would write here just in case this could be useful in any way..

    you could:
    1) put the dynamic array in a sub-application, sharing global values/strings with the main app
    2) setup a pseudo-scripting dialogue system between the subapp and the main app

    i.e.

    set global string to "action" to "retrieve_value"
    set global value "X_val" to 2
    set global value "Y_val" to 5

    sub app:
    global string "action" = "retrieve_value"
    >>> set output_value to (get value "dynamic array" X_val, Y_val)
    >>> set global string "action" to "here_is_your_value"

    main app:
    global string "action" = "here_is_your_value"
    >>> set counter to "output_value"


    This would have the limitation you couldn't do instant parsing of the array
    (meaning inside the same frame cycle >>> like in a loop)
    you would have to wait at least one frame for any value to be saved/retrieved

    So could be pretty much useless, depending on your needs

Similar Threads

  1. Array dynamic?
    By StingRay in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 12th December 2013, 05:22 PM
  2. Dynamic Array - Sort 2 dimension array by Column 1
    By Ryan in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 16th December 2012, 04:54 AM
  3. Is it best to use a dynamic array?
    By TheSynapse in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 2nd February 2012, 08:54 PM
  4. Dynamic Array to Binary Array problems
    By BREK in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 22nd March 2010, 10:48 PM
  5. Dynamic Array example files anyone?
    By BREK in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 10th March 2010, 12:04 AM

Tags for this Thread

Posting Permissions

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