User Tag List

Results 1 to 5 of 5

Thread: Duplicate active objects, Individual behaviors, specific X,Y

  1. #1
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Sep 2010
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Duplicate active objects, Individual behaviors, specific X,Y

    I'll try to explain as best I can.

    I have one object, duplicated 3 times...example:

    object A1 is at x 100 y 100
    object A2 is at x 150 y 125
    object A3 is at x 200 y 500

    Keep in mind these three objects are the same object duplicated 3 times. These will be chests in a dungeon, and I want to make it so that if I open object A1, but not object A2 and object A3, and leave a frame and come back, that objects A2 and A3 will stay closed and object A1 remains open.

    I read in the forum about "spread value" but I couldn't find it within the conditions in the event editor nor do I know the proper expression to use if one is needed. I was going to try using fixed values to populate a list object but I do not know how to associate a fixed value to a specific object at an x,y coordinate...plus, opening and closing each instance of a chest is not the problem. It's leaving that instance open or closed upon re-entering the frame.

    I guess a better question would be:

    Should I populate an array or list object with predetermined alterable values (or flags, since it's basically boolean) for each instance of the chest? If so, how would I associate each flag or alterable value to a specific object's x,y position within the frame and then have that value remain set if I leave re-enter the frame?

    Is there maybe an example of this somewhere I could follow?

    Thanks in advance!

    Also, I posted something similar in a thread in the MMF2 forums in reply to someone else's thread, against better judgment. I decided to post to the CF2.5 forum since CF2.5 is more up-to-date,and I'm not sure if it was agood idea topost there anymore. The topic I replied to seemed a bit old.

    Please forgive me if this seems like a duplicate post

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    A fun trick you can do, if you don't have way too many chests in the game, is to make the chest global and have every chest present in each frame that contains a chest, though keep chests from other frames outside the framearea. Fusion will actually remember the state of the object (values and flags at least), so you don't need to do anything else to make it remember if the chest was open or not. This is why all chests from the game needs to be present in each frame, even if they are not used in that frame. I know, this is not very good practice, but it works. Be careful when designing levels if you choose this approach though, as there is no way to know which chest is which in the frameeditor, as Fusion probably uses their fixed id to keep track.

  3. #3
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Sep 2010
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had considered that, however my levels are rather large and contain a ton of active objects as is...in fact I had to create a fast loop to boost the frame rate as a result of the massive size of each level...not to mention it's going to be a big RPG so there might be hundreds of maps. I don't know if making the chests global and accounting for each chest in the game within every single frame would work for me. The only way I think that might work would be to do it maybe in reverse...in which I create a frame that was simply used for all the events (such as the chests) and then make them global and call them into the appropriate frame....but not sure if that idea will be smart either.

    However I just might give that idea a try.

    [edit] I tried to use internal flags for the number of objects there were. I created 2 frames, an active object to move with, and another for the chest. I made 2 loops animations for the chest for open and closed, and gave the moving object 8 directions. Finally I made both objects global and duplicated the chest 4 times in both frames.

    My conditions were placed in each frame first, then moved to global events:

    -if <player> overlaps <chest>
    -upon pressing spacebar
    ---Set internal flag <Fixed( "chest" )> to on

    At first it seemed to work, allowing me to move between frames. I was free to move between frames by setting up "if player moves out of frame jump to next frame". If I pressed spacebar over an object, that object would "open"....I tried it on both frames....but when I moved opened one chest in frame 2....moved to frame 1 and back to 2, the box I opened remained open but I could not open the others. Furthermore none of the boxes in frame 1 would remain open....and would always reset. So, it's safe to assume I am on the right track.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Well, in that case I think you should use an ini. Have a group for each frame, and have each chest as items.

    [Room 1]
    Chest1 = Open
    Chest2 = Closed
    Chest3 = Open
    Chest4 = Open

    In each frame you use Spread vaue 1 on an Alterable value of the Chest object to to give each of them a number.

    At start of frame, you can run a for each loop on the chests, and compare the alterable value with the ini groupitem to check if it is open or closed.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module

    Join Date
    Feb 2014
    Posts
    1,055
    Mentioned
    29 Post(s)
    Tagged
    1 Thread(s)
    Hi ffomega. Don't know if u fixed it yet but i can try & explain how i would do it (although i've only just started using fusion). in the chest objects properties i wud rename the first alterable value to "ID" then in the event editor i wud put the line

    Always - spread value 0 in ID (u can find the spread value in the alterable values menu in the under your chest object column)

    after you've set this command all your chest in the game will be given a different value of there ID variable. chest object 1 ID=0,chest object 2 ID=2,chest object 3 ID=2, etc

    then u can simply test for a particular chest object with these sort of lines


    ID of chest object=0 & (touching conditions) - change chest object animation to closed
    ID of chest object=1 & (touching conditions - change chest object animation to closed
    ID of chest object=2 & (touching conditions) - change chest object animation to closed

    this is how u can pic a particular object, or at least that's how i'm doing it at the mo

    Hope this helps. Sorry if the explanation isn't to clear, i'm better at making the stuff than explaining lol

    =)

Similar Threads

  1. Populating duplicate active objects from an array
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 25th June 2012, 12:06 PM
  2. Controlloling individual objects in a group
    By dub in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 26th June 2008, 09:58 AM
  3. how to create an individual active object.
    By gamer4fun in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 4th June 2007, 01:21 PM
  4. Loops for individual objects..
    By Flava in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 13th April 2007, 12:14 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
  •