User Tag List

Results 1 to 5 of 5

Thread: When Object1 is at 3 pixel from object2..Possible?

  1. #1
    No Products Registered

    Join Date
    Oct 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    When Object1 is at 3 pixel from object2..Possible?

    I know there is this option for window's edges, but I need it for active objects. Object 2 can appears everywhere so I need it.

    Example:

    When Object1 is at 3 pixel from object2 destroy object 2

    How can I do it?

    (I don't need collision, I need this to fix a little bug in my game)

    Thanks

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: When Object1 is at 3 pixel from object2..Possi

    If your objects are more or less circular, it should be easy. Just calculate the distance between the two objects, and in case the distance is smaller than a specific value, remove the object.

    Check this example for finding out the distance between two objects.

    However, if the objects are not very circular, and you want to detect how close the actual pixels are... then I don't know how to do it

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Location
    Germany
    Posts
    236
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: When Object1 is at 3 pixel from object2..Possi

    Or make a second object (invisible) that is 3 pixels larger and follows your first object.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: When Object1 is at 3 pixel from object2..Possi

    Ah, detectors... That works too.

  5. #5
    No Products Registered

    Join Date
    Oct 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: When Object1 is at 3 pixel from object2..Possi

    Pls explain me how detectors work...

    I need it in my alley cat remake

    the broom has to follow the cat but when the cat creates powder around the room, the broom has to reach it and destroy it (clean) everywhere it appears and then the broom has to follow the cat again...

    HOW THE BROOM FOLLOWS THE CAT

    °If BROOM "X" is greater or equal or it is lower or equal to CAT "X"------> BROOM LOOKS AT X0,Y0 FROM THE CAT
    °If BROOM "Y" is greater or equal or it is lower or equal to CAT "Y"------> BROOM LOOKS AT X0,Y0 FROM THE CAT

    HOW POWDER IS CREATED

    °When CAT object collides with "endroomobject" create powder at 0,20 from the cat

    HOW THE BROOM REACHES THE POWDER

    °If BROOM "X" is greater or equal or it is lower or equal to POWDER "X"------> BROOM LOOKS AT X0,Y0 FROM THE POWDER

    °If BROOM "Y" is greater or equal or it is lower or equal to POWDER "Y"------> BROOM LOOKS AT X0,Y0 FROM THE POWDER

    HOW THE BROOM DESTROY THE POWDER

    °When BROOM object collides with POWDER object destroy it


    Ok with this code the broom follows the cat and it reaches the powder when it is created but often it doesn't destroy the powder and its position stop near it , maybe it can't collide with it perfectly, I don't know really.
    So I'd like to know if it is possible to destroy powder object when broom object is near 3 pixel from it.

    Let me know....

    Thanks







Similar Threads

  1. Get size in pixel of a string (or convert string length to pixel)
    By iOSC in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 21st March 2013, 06:30 PM
  2. How would you move an object in straight line pixel by pixel from location to another
    By Tsun in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 22nd December 2012, 10:38 PM
  3. Beta 11: Moving buttons Pixel by Pixel
    By Kisguri in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 16th January 2011, 08:54 AM
  4. Jump from walls pixel by pixel?
    By Carlos182 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 29th September 2009, 05:15 AM
  5. Sub-Pixel Positioning Pixel Shader
    By LazyCoder in forum Hardware Accelerated Runtime
    Replies: 15
    Last Post: 16th March 2008, 11:24 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
  •