User Tag List

Results 1 to 8 of 8

Thread: If Object is in the Play Area....

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    756
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    If Object is in the Play Area....

    I have a problem... I have 3 instances of "Object A" in this large scrolling level, and I want it so that whenever any instance of "Object A" is in the Play Area (if you can see it currently in the screen), I want to create an "Object B" and place it on top of "Object A" (it's a special effect that I don't want to use on objects out of frame to save memory).

    Here's my code:
    + "Object A" is in the play area
    - Create "Object B" at (0,0) from "Object A"

    But whenever any "Object A" is on screen, an "Object B" only gets created at the first "Object A" I placed in the level. How can I make this work for multiple "A" objects in one level, and also the possibility of having multiple A's on the screen at once?

    If possible, I would like to avoid Spreading a value through one of their Alt Values and Fast Looping through each instance on every frame to check if any of them are on screen... that takes up too much valuable memory.

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: If Object is in the Play Area....

    Use the ForEach object, it's much more efficient than spreadvaluefastloop
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: If Object is in the Play Area....

    Quote Originally Posted by Bipolar_Games
    If possible, I would like to avoid Spreading a value through one of their Alt Values and Fast Looping through each instance on every frame to check if any of them are on screen... that takes up too much valuable memory.
    How would that take up memory?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    756
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: If Object is in the Play Area....

    Quote Originally Posted by Jamie
    Quote Originally Posted by Bipolar_Games
    If possible, I would like to avoid Spreading a value through one of their Alt Values and Fast Looping through each instance on every frame to check if any of them are on screen... that takes up too much valuable memory.
    How would that take up memory?
    Maybe I'm using the wrong word... it would slow down the FPS because it's running every frame for every instance of Object A, that's what I mean.

    Anyway, I'll try ForEach, I've never used that one before, thanks!

    Edit: ForEach worked perfectly!! Though now I have a problem with "If Object is in the play area." Apparently I am a bit rusty (it's been a while since I've done any thing big in MMF2), but I thought that meant "If Object is in the visible section of the frame," meaning if you have scrolled to a spot where you can physically see the object. I guess not... is there any way I can do that other than checking X and Y values?

  5. #5
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: If Object is in the Play Area....

    X"Object is closer than 0 pixels to window's edge" would be what you want.

    "Object is in the frame area" means if it is in the frame area, not screen area.
    Working as fast as I can on Fusion 3

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    756
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: If Object is in the Play Area....

    Yeah that's what I was trying to avoid... why is there not a "Object in Screen Area" condition yet? Get to it devs! :P

  7. #7
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: If Object is in the Play Area....

    "Object in Screen Area" == "[color:#FF0000]X[/color] Object is closer than (Object Size * -1) pixels from the edge of the screen"
    Working as fast as I can on Fusion 3

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    756
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: If Object is in the Play Area....

    Oh fine, lol.

    So I tried it, and it took more processing power to check if it's in the screen than it did to just create Object B on all of the A's no matter where they are. Thanks tho!

Similar Threads

  1. Wrapping around play area
    By MangoMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th December 2011, 02:46 AM
  2. Make object go faster in play area
    By Evilized79 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 31st May 2011, 06:17 AM
  3. How do you wrap an object around the play area?
    By FlinkGigitty in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 29th August 2010, 10:22 PM
  4. Collisions only in play area.
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th September 2009, 09:03 PM
  5. How to define play area?
    By The Thinker in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th November 2006, 11:23 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
  •