User Tag List

Results 1 to 4 of 4

Thread: Collider for Multiple Instances of an Enemy

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Dec 2022
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Collider for Multiple Instances of an Enemy

    I am trying to create a collider that maps to an enemy's X position.

    I have tried placing the collider over each instance of the enemy in the frame editor, and using "collider is overlapping enemy - set X position of collider to enemy". This works up until two enemies overlap, then one "Steals" the other's collider. I have tried everything imaginable to scope the objects so that the colliders are unique to each enemy, but nothing is working. I tried matching their instance values, using fixed values, but the best I'm able to get is one collider follows the enemy while the rest don't move.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Apr 2012
    Location
    Heidelberg, Germany
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I often have trouble picking the right objects myself. Sometimes it doesn't work at all, sometimes unreliable. I have some code here that has worked reliably so far. Player can be your enemy and the hat is the hitbox.

    creating loop
    loop.png

    pick objects with same instance value
    Unbenannt-2.png

    Compare instances is a good method and in my case I added a loop for each Player. Loops can fix things which work mostly but not always (when two events happen at once maybe??)

    My code is just for picking, the overlapping can make things more complicated. I documented some strange overlap behaviour in this thread:
    https://community.clickteam.com/threads/110123-Two-true-conditions-become-false-when-combined-(overlap)

    If it doesn't work, try to separate the code like.... Set variable A to 1 when things overlap and 0 if not. In another line ask for instances and objects with variable A at 1. I'm just guessing, it's hard without seeing your code.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Dec 2022
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    instance troubles.jpg

    This is the code. I feel like this worked for me in the past. All the objects are created at the right positions, and I checked in the debugger and all the valuse for each object line up properly. None of the objects move at all, though. What is going wrong?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    VBEinc's Avatar
    Join Date
    Oct 2015
    Posts
    879
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by silvascreen View Post
    instance troubles.jpg

    This is the code. I feel like this worked for me in the past. All the objects are created at the right positions, and I checked in the debugger and all the valuse for each object line up properly. None of the objects move at all, though. What is going wrong?
    I was going to type out how I do it.
    However, I just made an .mfa for you.
    The Example I made, allows you to create as many enemies as you wish or destroy as many as you wish.
    All of them have their own Collision Boxes.
    LINK: https://drive.google.com/file/d/1kC4...usp=share_link

Similar Threads

  1. Replies: 7
    Last Post: 14th December 2017, 01:11 AM
  2. Using the Platform Movement Object for multiple instances of one enemy, help!
    By edman3d in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 29th August 2017, 12:46 PM
  3. Replies: 3
    Last Post: 19th September 2015, 09:28 PM
  4. Multiple Instances Help
    By macca02 in forum Fusion 2.5
    Replies: 2
    Last Post: 23rd February 2014, 11:05 PM
  5. multiple instances spawning at multiple places
    By CPW in forum Multimedia Fusion 2 - Technical Support
    Replies: 17
    Last Post: 22nd February 2009, 12:38 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
  •