User Tag List

Results 1 to 7 of 7

Thread: Layer and code

  1. #1
    Clicker Multimedia Fusion 2
    _blob's Avatar
    Join Date
    Mar 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Layer and code

    Hi, got a question about layers.

    I'm trying to organize my game to easily lock or turn invisible backgrounds, platforms and such. However I dont want it to mess up with the code.
    Is there a way to make objects affect all layers ?
    Otherwise is there a way to have the create object by default on another layer than the one at the bottom of the list ? (My layer at the bottom is the background layer, I dont want created objects to ever go there)

    Thanks

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You can create objects on whatever layer you want.

    You can move objects to any layer at any time.

    By moving an object to a layer, testing for collisions, and then moving back to it's original layer, you can test for collisions of a layer 1 object to a layer 2 object,

  3. #3
    Clicker Multimedia Fusion 2
    _blob's Avatar
    Join Date
    Mar 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the quick reply Chris.
    Hmm those are still actions to do on each objects. I was hoping for a property on the layer, too bad.

  4. #4
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You can move objects from layer to layer based on their fixed value. Run a loop to add all the fixed values of the objects you want to move to a list or an array. Then run another loop to move all objects with the fixed values in your list to whatever layer you want them. Get creative Blob!

  5. #5
    Clicker Multimedia Fusion 2
    _blob's Avatar
    Join Date
    Mar 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ohhh, layers are new for me. I hadn't thought of the fact they could be reassigned to any value... But yeah, art and game design are my areas, and despite me I have issues finding coding tricks sadly.
    Thanks Chris !

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Sorry, I explained that poorly.

    Every object in your game has a unique fixed value. Something like 66536 for example. What I was trying to say was you could run a loop to retrieve all the fixed values of objects you might want to move between layers and then store those in list or an array. Then when it's time to move them, just run another loop moving all objects with fixed values matching to the ones in your list.

    But as always, there is an unlimited number of ways to solve every problem and this way might not work best for you.

    What kind of art do you make?

  7. #7
    Clicker Multimedia Fusion 2
    _blob's Avatar
    Join Date
    Mar 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's all good, I see from one of Nivram's tutorial how to use the separate IDs ( I knew how to get them but not how to use them properly ). It should be OK anyway, I just needed to put all the actives in the layer !

    I'm a texture artist for a 3D animation company (but taking 3 months off to make my game, so you'll see me around more for a few weeks).
    I occasionally do digital illustration for fun otherwise http://blob1.deviantart.com/

    My game is full pixel art though, in 320x240
    http://insertcoinsplz.blogspot.com/

Similar Threads

  1. Layer Object: Moving X and Y of layer is very slow
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 5th April 2013, 01:19 AM
  2. Creating a new Layer: Layer referrances
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 17th October 2012, 11:44 AM
  3. Position layer using Layer Object
    By Sumo in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 4th October 2012, 05:51 AM
  4. V-Code Generator Source Code
    By LB in forum File Archive
    Replies: 1
    Last Post: 10th March 2008, 08:52 PM
  5. Layer Object can't move counters to specific layer
    By JoKa in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th November 2007, 11:11 AM

Posting Permissions

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