User Tag List

Results 1 to 7 of 7

Thread: circling problem

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2009
    Location
    Bethesda, MD
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    circling problem

    In an application, I want an enemy to circle the player when it gets close enough. to do this, I put a "field" around the player, to detect when the enemy is close enough. when the enemy overlaps the "field", it switches to circular movement, and sets an alterable value to 1. when the alterable value equals one, I set the center point of the circle to the X and Y coordinates of the player (actually, a small active object always being repositioned to the upper left of the player. However, when the enemy overlaps the field, it just constantly repositions itself to the right of the player. what have I done wrong? here's the link: http://www.mediafire.com/file/ht3ongjnu4o/test 1.mfa

    Thanks!

  2. #2
    Clicker Fusion 2.5

    Join Date
    May 2008
    Location
    In Your Cheese
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: circling problem

    You need to add a "One action when event loops" to the "enemy is overlapping the detector" event.

    The problem is that the "Overlapping" event happens over and over, causing the enemy to repeatedly be set in the circle pattern starting position. Putting the "only one action" condition makes it so it only happens once.

  3. #3
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2009
    Location
    Bethesda, MD
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: circling problem

    Thanks, that works perfectly. on a similar question, how do I get the enemy to move into place rather than simply appear?

  4. #4
    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: circling problem

    Have him move toward another object that has the circular muvment, and possibly have the movement set so the enemy doesn't end up walking through the player on his path to the object.
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2009
    Location
    Bethesda, MD
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: circling problem

    That could work, but what I really need is some sort of way for his starting point with the circular movement to simply be his position when the motion is added, and simply having him move toward the starting point wouldn't really accomplish that.

  6. #6
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: circling problem

    I wouldnt reccomend using an active object to detect distance. use the Advanced Direction object extension or the mmf2 functions (sin/con/tan/whatever) to detect it. It saves a LOT of memory and processing power and should stop your game lagging on slow machines when you have a few objects. Just some advise

  7. #7
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2009
    Location
    Bethesda, MD
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: circling problem

    Thanks for the tip! However, my problem still remains.

Similar Threads

  1. Pulling Problem and Shooting Problem
    By Duggabboo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 21st March 2010, 05:24 PM
  2. Circling Bad guys
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 29th July 2009, 07:21 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
  •