Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Associative Array

    With the Associative array you can save and load character positions, directions, current stats, or just about any value you need. It can, when made global, also share these values over frames and sub-applications, which is really handy for inventories, maps and other things. The beauty of this array is the use of plain english "Keywords", which can be followed by a number or string such as:

    NivramsOxygen=480
    or
    NivramsLevel=duffus

    You can also retrieve data of counters, alterable values, global values, characters, enemies, Associative Array, or just about anything.

    This makes it simple, along with good comments, to keep track of what is happening within your game or application. Use the Modify/Add a Value or Modify/Add a String to set the value at a Key.

    Nivram overlaps Garlic
    +Only one action when event loops
    Associative Array: Set Value at Key "GARLIC" to 1
    Garlic: Destroy

    To retrieve the data (Key) from the Associative Array, Compare Two General Values:

    "GARLIC"=1
    +Only one action when event loops<BR>
    Garlic:destroy

    When you save your game using the Associative Array, the Key is saved. When you load the game, the Key GARLIC will be equal to 1. The garlic will be destroyed and Nivram will still have the garlic. If you desire, when the Key GARLIC=1 you can place a garlic icon in an inventory slot somewhere.

    So, how do we save our game?
    Let's say we have a Save Button and want to save the array in the game directory:
    Player clicks on Save Button
    Associative Array: Save Associative Array file apppath$+"nivram.dat" (you can use any name and file ext you want like: duffus.sav)

    So, how do we load our game?
    Let's say we have a Load Button and want to load the array from our game directory:
    Player clicks on Load Button
    Associative Array: Load Associative Array file apppath$+"nivram.dat"

    I also want to let you know that for some value loadings, such as position of the character, you must put in a second event for clicking on the Load Button. The loading of the array needs to be first, before calling up values. If the values, such as character postion, is called before loading the actual array, the character position will not be loaded.

    The Associative Array can find an instance of a word or string. So you can load in a vocabulary and see if the word exists without looping. Instead of having numerous List Objects for Shops in an RPG, you could use just one Associative Array. With it you can list the item and price and call it up for any Shop your player enters. Very good if your player changes levels. You load up the Associative Array, then all you have to do is take a couple of items and their prices, and put them into the Shop.

    A couple of notes for you:
    You can disable the pop up for this extension by unchecking "Remind me later"
    My thanks goes out to Click Team, the developer of this extension, and forum members for their help and understanding.

    458 TGF to CTF 2.5+ Examples and games
    Please login to see this link.

  • lol a good tut. for those who dont know how to use the extension

    too bad i cant get it though.....


    btw can someone get me an idea on when MMF3 is coming out for beta?

    Angelfox can own firefox

    Chuch Norris Owns!

    Need Rpg help? Private Message me for help. Just dont ask me to do graphics and i can help you with just about anything RPG related...

  • I already know how to use it pretty much, but I wanted to say that it is a useful tutorial.

    Also, could you talk a bit more about this part?

    Quote from nivram

    The Associative Array can find an instance of a word or string. So you can load in a vocabulary and see if the word exists without looping. Instead of having numerous List Objects for Shops in an RPG, you could use just one Associative Array. With it you can list the item and price and call it up for any Shop your player enters. Very good if your player changes levels. You load up the Associative Array, then all you have to do is take a couple of items and their prices, and put them into the Shop.

    I don't really understand your connection between lists and looking for a string. For that matter, how does it help me to look if a word exists? Do you mean for the values or for the keys?

    Please login to see this link.!

    My latest game level.break on Please login to see this link. and Please login to see this link. - a pseudo-code hacking puzzle game.

  • Nice article!
    The "Garlic=1 destroy garlic" was a real pearl! For anyone dabbling in metroidvanias this can be an awesome asset in controlling pick-ups and secret entrances! :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!