User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Moving object according to backdrops?

  1. #1
    No Products Registered

    Join Date
    Jun 2007
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Moving object according to backdrops?

    I actually have 2 problems I've been trying to figure out for days! Maybe someone could help?

    1. How do I get an object to move around platforms that are in its way? Say I have an enemy that can stick to walls, and it's in a square room with a few platforms sticking out of the wall. I can get the enemy to move around in the square no problem, but how would I get it to move around the platforms coming out of the wall? I could probably do this by using detectors, but I'd rather not, any way that is possible?

    2. How do I get an object (an arrow for example) to stick to another object (moving target) at the same place it collided with it?

    Thanks for any help!

  2. #2
    Clicker Fusion 2.5iOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving object according to backdrops?

    I've been working on a "wall crawler" engine for my latest project and it's working pretty good. Check it out:
    http://crusher.metalgear.googlepages.com/zoomer2.mfa

    Basically what it does it check 3 different spots for collision (or the lack of) to determine which direction to switch to. It only moves the enemies one pixel at a time though so I'm using a fastloop to move them four times faster.

    Now, it's not a very efficient engine in that I have to constantly set the Collision A/B/C values during the loop and I have yet to come up with a better solution... I would be grateful if someone could suggest a better way of doing this.

    Either way this just might be what you need. Oh and sorry, I haven't commented it. Just ask if you don't understand and I'll try to help.

  3. #3
    No Products Registered

    Join Date
    Jan 2008
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving object according to backdrops?

    1. To figure this out, I would like to know how you move the enemy around in the square room (you say you can do that no problem).


    2.
    On "Arrow" collides with "Target"
    -> set valueA of "Arrow" to: "Xarrow" - "Xtarget"
    -> set valueB of "Arrow" to: "Yarrow" - "Ytarget"
    -> set flag 0 of "Arrow" on

    Flag 0 of "Arrow" is on
    -> set Xposition of "Arrow" to "Xtarget" + valueA
    -> set Yposition of "Arrow" to "Ytarget" + valueB

  4. #4
    No Products Registered

    Join Date
    Jun 2007
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving object according to backdrops?

    Well there are probably simpler ways to move it in a square, but most of the time I will just use values to move its x,y positions, and another value to tell the object how long to move in that direction.

    value A=1
    Value B<50
    -set xpos("object")to("object")-1
    -Add 1 to Value B

    (I use the same event for other directions, but I don't feel like typing everything down, you get the point :P )

    Value A=1
    Value B>=49
    -Set Value A to 2
    -Set Value B to 0

    Something like that atleast. Thanks for the "arrow" expression I'll have to try that out in a min.


  5. #5
    No Products Registered

    Join Date
    Jan 2008
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving object according to backdrops?

    Why dont you use the built in pathmovement?

  6. #6
    No Products Registered

    Join Date
    Jun 2007
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving object according to backdrops?

    Because path movement is strictly following a given path, with no alternatives. If I make an event that will move that enemy differently, it will forever be off course, among many other things. Not like my above expressions are much different, but those are very simple movements. It's just more manageable to use expressions imo. That and I don't like using the built in movements I'd rather do it on my own O_o

  7. #7
    No Products Registered

    Join Date
    Jan 2008
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving object according to backdrops?

    Well then it would be difficult without using invisible detector objects. It can be done in many different ways, depending on how your engine works.

    Are the platforms square too? are there any slopes?
    Complex, round shapes would make this harder to do.
    Are your levels dynamically loaded? are they tiled?

    Maybe you should post a picture of what the level looks like. Or upload your .mfa file, cause we are working blind here :S

  8. #8
    Clicker Fusion 2.5iOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving object according to backdrops?

    Did you have a chance to try my example yet? I forgot to mention that it's detectorless, doesn't rely on any pre-built paths and works with slopes too. It's basically works just like the enemy "Zoomer"in the Metroid series.

  9. #9
    No Products Registered

    Join Date
    Jan 2008
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving object according to backdrops?

    Wow crusher! I never knew of the existence of the Collisionmask testing That's very valuable! I learned something

  10. #10
    Clicker Fusion 2.5iOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving object according to backdrops?

    Glad I could be of service somehow. Collision masks are very useful and because of them there really are no reasons to use detectors anymore.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Using Duplicate on Platform Object Backdrops
    By ChrisFrankie in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 27th March 2012, 02:08 AM
  2. Bug: Why is my Object moving?
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 22nd March 2012, 08:28 AM
  3. moving actives, or backdrops... or other stuff :)
    By clim in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 2nd March 2011, 03:40 AM
  4. Good way to make object crawl around backdrops?
    By Krim in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 27th February 2011, 06:11 AM
  5. Attach active object to a moving object and follow
    By Worf in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th January 2010, 06:50 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
  •