User Tag List

Results 1 to 9 of 9

Thread: make enemy follow footsteps

  1. #1
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    make enemy follow footsteps

    Hi,
    I am trying to make some enemy AI logic in fusion.
    So far so good, but got stuck on the part where the enemy is following the player .

    Its a stealth game, where running on top of a certain type of terrain leaves footsteps.
    The footsteps are one object being created every half a second while the player is running. Each instance plays slowly a decay animation and when that animation is over the footstep object gets destroyed.

    So Right now what I am trying to achieve is get my enemy to pick the oldest instance of a footstep object and move towards it (bouncing ball movement+aim at). When coliding with it, move towards the next footstep in line and so on.


    How do I get fusion to pick one object out of an instance by how long it has existed on the frame? Or by how close it is to the enemy.

    Basically I want the enemy to follow the player's crumbs.

    Is there an example out there I could look at?

    Thanks in advance

  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)
    I have an open source example on my website. The player leaves dots and the enemy follows that, thus tracking the player. "Node Example".

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

  3. #3
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Hi Marv,
    I will have a look on that thank you

  4. #4
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Hi Marv, the example is really nice, but it is very specific.
    In my case the player is creating a different number of footsteps depending on the environment and I dont want the enemy to destroy the footsteps when coliding with them, so as to be possible for other enemies to pick them up.

  5. #5
    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)
    I think in this case if the nodes were not destroyed the enemy would stop, as the enemy is programmed to follow the oldest node.

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

  6. #6
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    so maybe using a variable instead of the oldest node? And on each collision the variable gets updated?

  7. #7
    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)
    Try that and see if it works. To tell you the truth I can't get my head around that and if it works throw me an example.

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

  8. #8
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    679
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Here's a solution, although it lacks a distance check: https://www.dropbox.com/s/zb9pz2m97g...step2.mfa?dl=0

  9. #9
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    this is a great example casleziro
    It solves things for me. I will try to use it in my game

Similar Threads

  1. Replies: 2
    Last Post: 3rd December 2014, 01:50 PM
  2. enemy follow player?
    By Viewtiful in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 2nd January 2011, 06:43 PM
  3. Enemy Follow Help
    By brawler12345 in forum File Archive
    Replies: 3
    Last Post: 16th July 2008, 11:34 PM
  4. how do you make enemies that follow you?
    By zuloo in forum The Games Factory 2 - Technical Support
    Replies: 9
    Last Post: 5th May 2008, 11:32 PM
  5. How can I set enemy object to follow my character?
    By The Thinker in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 6th November 2006, 12:18 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
  •