User Tag List

Results 1 to 9 of 9

Thread: How to make an enemy chase you and collide with backround?

  1. #1
    No Products Registered

    Join Date
    May 2012
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to make an enemy chase you and collide with backround?

    does anybody know the methods to do this, i tryed but cant quite come up with it properly? is there an engine of some sort on here?

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Side scrolling or top down?

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,151
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    I know I saw an example here for this, but I cant remember what it was called :/. It was top down GTA style and you could spawn enemies or barrels in a generated maze.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I usually dont like to suggest the built in movements, but in this case it makes it easy for you:

    #1
    Create Collision masks for your Enemies ( not animated ).
    Give them the Bounching Ball Movement.

    #2
    Pin your Enemy Sprites to your Enmey Collision Masks, using this event:

    Always
    --> Sprite set possition to Mask

    Also make the sprite leach any nessesary data of its Parrent ( Mask ), like this.

    Always
    --> Sprite set possition to Mask
    --> Sprite set direction ti Mask direction

    #3
    Give your Collision Masks the Chase AI.

    #4
    Then make an Event Saying

    Collison Mask collides with Backdrop
    --> Collision Mask 'bounce'

    ...
    I think this works best if the Bouncing ball Movement has full Acceleration and Deaceleration.

    ...
    This method should Make your Enemies Chase you, and also be able to collide with walls and obstacles.

  5. #5
    Clicker Fusion 2.5

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or, have static movement for the mask and say

    If player x < mask x
    mask is not overlapping a background
    lower mask x by 1

    If player x > mask x
    mask is not overlapping a background
    increase mask x by 1

    If player y < mask y
    mask is not overlapping a background
    lower mask y by 1

    If player y > mask y
    mask is not overlapping a background
    increase mask y by 1

    That ought to work, since it will follow walls too.

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you're still having trouble, I'm writing a large tutorial full of smaller lessons. This is one of them. It should be done in a week or so...

  7. #7
    No Products Registered

    Join Date
    May 2012
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK. Heres wut i was able to come up with Thx to King_cool
    Does anybody have an more advance 1? Like the enemy stops at an obstacle and goes the other way
    http://www.sendspace.com/delete/yxvn...4e883d550922ad
    or
    Attached files Attached files

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont know what you have done in your code, but what i told you to do doesnt seem to be working the way its supposed to in your Application.
    I have attached a simple example wich illustreates how Enemies are able to Chase the Player and Collide with Backdrop Obstacles, Active Obstancles and Eachother.

    Reading your last post however, leads me to believe that what you are looking for is 'Pathfinding' as well.
    Pathfinding is not an easy thing to do, although there are numerous extencions for this.
    Attached files Attached files

  9. #9
    No Products Registered

    Join Date
    May 2012
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thx, this works alot better. Im not too good with extensions but this helps out alot.

Similar Threads

  1. How to make charactors collide with bricks?
    By yut640 in forum The Games Factory 2 - Technical Support
    Replies: 7
    Last Post: 19th October 2011, 09:27 PM
  2. how do you make a boss chase your charcter
    By kainan in forum The Games Factory 2 - Technical Support
    Replies: 14
    Last Post: 19th December 2007, 12:00 PM
  3. How to make a realistic looking backround
    By Ravi in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th December 2007, 03:25 PM
  4. How do I make enemy movements like AI?
    By Scooter in forum The Games Factory 2 - Technical Support
    Replies: 11
    Last Post: 28th November 2007, 07:23 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
  •