User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 18 of 18

Thread: AI walking

  1. #11
    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: AI walking

    Sqr() is the MMF2 Square Root function, yes.
    Working as fast as I can on Fusion 3

  2. #12
    No Products Registered

    Join Date
    Jul 2010
    Location
    Australia
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI walking

    Quote Originally Posted by RickyRombo
    * Enemy overlaps player
    OR
    * Enemy overlaps player 2
    -- Attack
    Yep, that's the best way I can think of.
    I don't use extensions alot, so I always use a bouncing ball enemy. Use something like;
    Code:
    -->Every 50 hundreths of a second
    == Enemy -> Look in direction of player.
    If you want the enemy to only chase the player when he is near the enemy, use a "Line of Sight".

    Create a wide, colored in circle that is semi-transperant, with its origin at the middle.
    Code:
    --> Always
    == LOS set pos to 0,0 of player
    Then;
    Code:
    --> Enemy overlaps LOS
    ++ Every 10 hundreths of second
    == Enemy movement start
    == Enemy direction look in direction of 0,0 from player
    If not overlapping
    Code:
    --> NEGATE Enemy overlaps LOS
    == Enemy movement Stop.
    *or*
    Code:
    --> NEGATE Enemy overlaps LOS
    ++ Every 90 hundreths of a second
    == Enemy movement start
    == Enemy set direction to Random(32)
    The top means the enemy stops dead, the bottom makes the enemy wander around.
    You will also need;
    Code:
    --> Enemy collides with backdrop
    == Enemy bounce.
    Its a lot of code, but it should work for a bouncing ball movement. I use it a lot in my work for enemies that chase the player, but then stop and lose interest when the player runs away.

  3. #13
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    turtle's Avatar
    Join Date
    Jun 2010
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI walking

    Yup... but guess there is no 'square' in MMF. We just need to multiply it again with the same item.

  4. #14
    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: AI walking

    What do you mean there is no square? This squares a value:
    Value pow 2

    EG (5 pow 2) = 25
    Working as fast as I can on Fusion 3

  5. #15
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI walking

    Sqrt() turns out its Sqr()

    The above formula is slow, I recommend using the Advanced Direction Object or Clickteam Movement Controller to calculate the distance, as I stated earlier

    EDIT: JEEZ! I came back to see this an a whole bunch of posts had beaten me...

  6. #16
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    turtle's Avatar
    Join Date
    Jun 2010
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI walking

    Thanks LB... didn't know pow exist Silly me...

    RickyRombo, yup I recommend using the Advanced Direction Object too...

    The Advanced Direction Object is usable in normal Application, Java and Flash too...

  7. #17
    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: AI walking

    Quote Originally Posted by RickyRombo
    Sqrt()
    In MMF2 it is Sqr()
    Working as fast as I can on Fusion 3

  8. #18
    No Products Registered

    Join Date
    Jul 2010
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI walking

    How do I do it with Advanced direction object? Got it working

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Walking up and downhill using PMO
    By Rabagast in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 5th December 2013, 01:21 AM
  2. Need help walking
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 27th August 2012, 08:23 AM
  3. Walking sound only when walking
    By delta9857 in forum The Games Factory 2 - Technical Support
    Replies: 7
    Last Post: 26th November 2010, 01:47 PM
  4. Iso walking
    By nivert in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 18th December 2007, 07:14 PM
  5. Walking
    By Stephen38 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 4th January 2007, 12:20 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
  •