User Tag List

Results 1 to 3 of 3

Thread: Editing arrays / preparing them for ingame use

  1. #1

    Editing arrays / preparing them for ingame use

    I have an array that should end up filled with various strings, is there an easy way to fill / edit it except for putting a huge "on start of frame" -> write "abc" to 1,1, "bbc" to 1,2. ... and so on for the whole array?

    Addmittedly the array is not that huge (maybe 2*5 for now, but will grow later) so I can even do it manually, but it'd be much better if I could maybe just load it at start.

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    0 Post(s)
    0 Thread(s)

    Re: Editing arrays / preparing them for ingame use

    depending on exactly what you need to fill it with, you may or may not need to do some manual work

    you should be able to use fastloops in any case; if you have a really weird set of strings, you could fill up a (hidden) list object with those strings and loop through both that and the array simultaneously, and drop the values in. for example, with an array 3 cells wide and 2 tall, you would have a list object with 6 lines. you have to decide whether you want to write to the array by rows or columns. in this example, i'll just write by rows (i'm also assuming that both the array and list object are set to be 0-based):

    Quote Originally Posted by list object contents
    seven (start of first row)
    yellow (start of second row)
    hammer time
    then you'd use:

    [Loading condition]
    --> Start Loop: "Write Y"; DimY("Array")
    On Loop "Write Y"
    --> Start Loop: "Write X"; DimX("Array")
    On Loop "Write X"
    --> Array - Write value to XY: List Line Text$("List", Loopindex("Write X") + Loopindex("Write Y") * DimX("Array")); Loopindex("Write X"); Loopindex("Write Y")
    or, if you just needed to fill it up with contents easily creatable through expressions (such as numbers based off the loop indices, etc) you wouldn't even need the list object

    the nice thing about arrays is that you can save them to a file and load them later; if you need to "pre-fill" an array, you could always have an entirely separate app to do that, save that array to a file, then load it in your main app

  3. #3

    Re: Editing arrays / preparing them for ingame use

    Thanks for the superb explanation… Fortunately in my case I could just make a list and feed the array with it, but I guess I`ll have to write a tool for editing arrays if I ever need anyhting more complicated.

Similar Threads

  1. Preparing for a commercial project - Q&A
    By Jonas_Kyratzes in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 4th July 2011, 11:31 PM
  2. Grid lock ingame? plz help!
    By Keehan in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 11th May 2011, 05:58 PM
  3. Patch Maker - Preparing original file
    By ionside in forum Install Creator and Patch Maker
    Replies: 3
    Last Post: 29th November 2010, 06:53 AM
  4. Preparing games for cloning (resizing)
    By Popcorn in forum Articles
    Replies: 10
    Last Post: 5th April 2009, 04:22 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