User Tag List

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

Thread: AI walking

  1. #1
    No Products Registered

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

    AI walking

    How can I make the enemies always walk towards "Player" and when they hit "Player" they'll attack.

    And if I play two player, They'll go and attack the nearest character.

    Please help, Thanks

  2. #2
    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

    * Distance between enemy and player < Distance("Advanced Direction Object", X("enemy"), Y("enemy"), X("player 2"), Y("player 2"))
    --Look at 0, 0 of player

    * Distance between enemy and player 2 < Distance("Advanced Direction Object", X("enemy"), Y("enemy"), X("player"), Y("player"))
    --Look at 0, 0 of player 2

    * Enemy overlaps player
    OR
    * Enemy overlaps player 2
    -- Attack

  3. #3
    No Products Registered

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

    Re: AI walking

    How do I do the "Distance between" condition?

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: AI walking

    Advanced Direction Object
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  5. #5
    No Products Registered

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

    Re: AI walking

    And where is that, I've checked the objects menu and conditions.

  6. #6
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: AI walking

    http://ext.neatwares.ath.cx/ext/Advanced_Direction_Object
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  7. #7
    No Products Registered

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

    Re: AI walking

    Seriously, isn't there any other way?

  8. #8
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: AI walking

    Quote Originally Posted by PimeX
    Seriously, isn't there any other way?
    Well if you set an enemy to ball movement you could have it always look in direction of player. Then when it collides with the player have it attack or whatever you want.

  9. #9
    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 PimeX
    Seriously, isn't there any other way?
    You could use the actual distance formual instead of the expression from the Advanced Direction Object. However that's more of a hassle, why don't you want to use the ADO?
    Working as fast as I can on Fusion 3

  10. #10
    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

    I think it might be like this ...

    Distance = Sqr((X("Item1")-X("Item2"))*(X("Item1")-X("Item2")) + (Y("Item1")-Y("Item2"))*(Y("Item1")-Y("Item2")))

    Is there a 'square' for MMF? I mean 'squareroot' is Sqr in MMF?

Page 1 of 2 1 2 LastLast

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
  •