User Tag List

Results 1 to 8 of 8

Thread: Items that stay the same way after you leave the frame

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Dec 2012
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Items that stay the same way after you leave the frame

    Say the player goes into frame 1, where he finds an important key. He takes the key and leaves to frame 2. However, if he comes back to frame 1, he'll find that important key there, right where it was before. He grabs it, and now he has two.

    I don't want this to happen; I want the key to stay gone when he returns. Or, for instance, if he moves a block over to one part of the room, when he leaves the frame and comes back, I would like for the block to continue sitting where he left it.

    What would be the most efficient means of achieving these ends?

  2. #2
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,016
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Create a global active object and use it's alterable values to store keys that have already been found.
    In the objects properties you can check the box 'Global Object'. This object can be invisible to the player, just use it as an object to store values/strings. You can also do this with Global Values/Strings however you will ultimately end up finding yourself limited in values/strings as the game gets bigger, so best to use Global Actives.

    Like such:
    Player collides with key: Set Alt Value A("Global Storage") to 1

    +Alt Value A("Global Storage") = 1: Destroy Key
    Want to learn Clickteam Fusion 2.5?




  3. #3
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    A question if I may Danny. What method would you use to save "Global Storage"? I was thinking a Associative Array.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  4. #4
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,016
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Hi Marv,

    I generally tend to use Regular INI (INI++ where possible for PC), I tend to stay away from Array's unless I think they're absolutely necessary for storing tables or multiples. I'll post a screenshot up here of how I layered out IGX in editmode, it made things 100x easier to work with in the end.

    Screenshot:
    http://snag.gy/hP9Uk.jpg

    I suppose everyone is different, but I like to think I can keep my project workspace as easily readable as possible, I also monster comment and group my code too. But certainly INI is better for me personally Marv, as I can use for all platforms, with ease and also the 64k limit doesn't get in the way as if push comes to shove I just cram more than one string/value into a group with delimiters.
    Want to learn Clickteam Fusion 2.5?




  5. #5
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    OK Danny. Thanks for your insight.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  6. #6
    Clicker Multimedia Fusion 2

    Join Date
    Dec 2012
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much for the help!

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Alonso's Avatar
    Join Date
    Jul 2006
    Posts
    681
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What I do, and you might find it handy, is to spread a value between all the items that can be picked up (via a qualifier). Then, when the player gets the item, you set a value in the ini/array specific to that item (by its spread value) and the frame in which it's found. For example, if you use the associative array: "framename_5" (spread value = 5). Then, when the frame starts, run a loop for the amount of items and check the ini/array to match for each item's spread value. If it matches, destroy the item. This way, you don't have to ever worry about coding such things again. You just place whatever item you want in whatever frame you want. The only drawback is that the z-ordering of items changes the spread value at the beginning of the frame, but you can easily account for that and leave it alone when the game's released.

  8. #8
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    What I have done in the past is use Global Values (since there is no limit and you can name the GV), and the Associative Array. Global Value bla bla=0 the item is there. Global Value bla bla=1 the item is not there. I am so used to doing this way it is almost automatic. Plus, the Associative Array is one of the few objects that carry over values to the Sub-application, making it great for inventory screens and such using the Sub-application.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. Pre-3GS support question (keep it or leave it?)
    By Anders in forum iOS Export Module Version 2.0
    Replies: 14
    Last Post: 28th January 2013, 01:16 PM
  2. [Bug] Leave channel (Flash)
    By Pharanygitis in forum Lacewing
    Replies: 0
    Last Post: 19th September 2012, 06:32 AM
  3. How to leave a trail?
    By Om1nO in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 15th November 2011, 10:22 PM
  4. How can I specify an object not to leave the frame
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd May 2010, 04:06 PM
  5. trial object -what does it leave behind?
    By Dave in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th July 2008, 08:20 PM

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
  •