User Tag List

Results 1 to 4 of 4

Thread: direction problems

  1. #1
    Clicker Multimedia Fusion 2 Developer

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

    direction problems

    In a game I am making, an enemy is supposed to attack when the character reaches a certain distance from it. For the condition, I simply did X("object 1")- X("Object 2") <= 1000, but I have no Idea how to make the enemy move towards the character.

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: direction problems

    If you are using custom movement:

    X("object 1")- X("Object 2") <= 1000
    Enemy: (if your character is right of enemy)
    Set X(enemy) to X(enemy)+1

    Enemy overlapping Character
    Enemy: start attack animation

    Be sure stop your enemy when it overlaps the character.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  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: direction problems

    How would I do that if I was simply using the 8-direction movement that comes standard for my character?

  4. #4
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: direction problems

    I was just hoping you were using a custom movement. What movement are you using for the enemies? If thet are just active objects that would still work.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. Custom 8 direction movement, problems with speed
    By Shawn in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 8th November 2013, 02:49 PM
  2. Get Direction (Please Help)
    By Captain_Harris in forum iOS Specific Example Files
    Replies: 0
    Last Post: 13th May 2013, 02:30 PM
  3. Problems with 8-Direction Movement
    By Gullyking in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 23rd June 2010, 02:43 AM
  4. Set Direction on HWA doe's nothing
    By dragonguy in forum Hardware Accelerated Runtime
    Replies: 4
    Last Post: 20th October 2009, 12:25 AM
  5. Direction
    By Brovic in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 11th June 2009, 03:06 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
  •