User Tag List

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

Thread: enemies glitching through each other

  1. #1
    Clicker Fusion 2.5 Developer
    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)

    Join Date
    Mar 2018
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    enemies glitching through each other

    how do i make it where the enemies dont glitch through each other? and how do i make it where the player doesnt glitch through the enemies? i already have a code i made but im not sure if i did it right. its all under the group of events called "Enemies". thanks Application_1.mfa

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,011
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    If you're using movement loops you will also have to stop the loop every time the player encounters an enemy - and stop the player at that point.

    If you tell Fusion to just randomly bounce the enemies it will pick any direction and that direction might be onto another enemy or onto the player. You would have to test their direction and reverse it for a few seconds, or manually bounce them in the right direction. i.e. if enemy is facing left - change enemy's direction to right, set flag on, after 1 or 2 seconds, set flag off.

  3. #3
    Clicker Fusion 2.5 Developer
    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)

    Join Date
    Mar 2018
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Janette5 ok so i did the flag suggestion and it kinda works here and there but not entirely. i did it only for the snake just to see what would happen. its under the comment "Snake Collision". Application_1.mfa

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,011
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    I haven't looked at your new upload - but here's an example of your previous question that was e-mailed to me before you edited it - you can refine this as you wish.

    I only changed lines 62 - 71 under enemies
    Attached files Attached files

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,011
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    You can also do something similar for the collision between the enemies and the player - that they stop when they encounter the player and turn the flag off for a short period of time.

  6. #6
    Clicker Fusion 2.5 Developer
    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)

    Join Date
    Mar 2018
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Janette5 ok so to prevent the player from glitching through the badguys pretty much do the same but just make the collision against the player. is this how? code is under "Crab". Application_2.mfa

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,011
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Try this:

    * Collision between Group.Bad and player
    + Group.Bad: Flag 1 is off // so that it deducts only 1 from the counter
    lives_counter : Subtract 1 from Counter
    Group.Bad : Stop // stop the enemy from moving further
    Group.Bad : Set Flag 1 on // so that it deducts only 1 from the counter


    * Group.Bad is overlapping player //continue to stop the enemy while it's touching the player
    Group.Bad : Stop


    * Group.Bad: Flag 1 is on //reset the movement once the enemy is no longer overlapping the player.
    + NOT Group.Bad is overlapping player
    Group.Bad : Start
    Group.Bad : Set Flag 1 off


    In addition with each movement loop you need to add in a block to stop the player from moving onto the enemy - I've shown you here an example for "move-up" - but this has to be inserted in every direction loop.

    * On loop "move-up"
    + player is overlapping Group.Bad
    Special : Stop loop "move-up"
    player : Set Y position to Y( "player" ) + 1



    Line 79 or somewhere there you are setting the flag on - you need to set it off:

    * Alterable Value A of Group.Bad = 0
    Group.Bad : Set Flag 0 off

  8. #8
    Clicker Fusion 2.5 Developer
    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)

    Join Date
    Mar 2018
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Janette5 ok, just to make sure im doing everything right, is this good? Application_3.mfa

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,011
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Lines 22 - 39 you created your own movement system - or used a movement system that someone created using loops instead of Fusion's built-in movement.

    In that system you need to include loops to stop the player.

    I gave you the example of the direction move-up - but you need to do the same for the other directions.

  10. #10
    Clicker Fusion 2.5 Developer
    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)

    Join Date
    Mar 2018
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Janette5 ok so i did all the stuff you said and it all works but i did have a problem. the player gets stuck and doesnt move when the badguys collide with him and just stays in one spot most likely because of the loop stops. i think one way to fix it is to negate some actions but im not too sure. heres the completed file, the codes are in between the red lines. Application_4.mfa

Page 1 of 2 1 2 LastLast

Similar Threads

  1. character glitching through walls
    By Euingee in forum Fusion 2.5
    Replies: 2
    Last Post: 24th April 2020, 03:59 AM
  2. character glitching through enemies
    By Euingee in forum Fusion 2.5
    Replies: 2
    Last Post: 15th December 2019, 06:14 PM
  3. Bad glitching with my Vitalize! app
    By Raylax in forum Vitalize
    Replies: 2
    Last Post: 12th October 2008, 10:55 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
  •