User Tag List

Results 1 to 10 of 10

Thread: Moving player character around enemies... in front/behind... need help

  1. #1
    Clicker Fusion 2.5

    Join Date
    Jun 2017
    Posts
    47
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Moving player character around enemies... in front/behind... need help

    onus_title.jpg

    onus_area.jpg

    onus_inventory.jpg

    Working on a demo, similar vantage point as River City Ransom, Double Dragon etc

    We are trying to get the player character to be able to move in front of -- and behind -- enemies etc but we cannot seem to figure it out : (

    Open to any advice : )

    Thank you

    Jon and Jim

    ONUS: The Phantomas Agenda
    Game demo (early and rough)
    https://mega.nz/#!slIEkDRb!2i9Mijefw...qeFGPI9vAu3uo4

  2. #2
    Clicker Fusion 2.5

    Join Date
    Jun 2017
    Posts
    47
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    onus_player_position.jpg

    Here is an example. Notice how the player character does not properly maneuver around the game space... behind and in front of enemies...?

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,300
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Sort the objects by Y Position, and make sure all of their hotspots are in corresponding positions (it's easiest to just always put them bottom-center).

  4. #4
    Clicker Fusion 2.5

    Join Date
    Jun 2017
    Posts
    47
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    What do you mean by "Sort the objects." Im so sorry we are kind of new to this and are still trying to figure this out. I do understand the hotspot by putting it center bottom.

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,300
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Add a "Layer" object to your frame.
    Create a new "Always" event, and give it the action: Layer Object -> Sort -> By Y (decreasing)

  6. #6
    Clicker Fusion 2.5

    Join Date
    Jun 2017
    Posts
    47
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    When you say "add a Layer object to your frame," do you mean adding an active object to a new layer? Sorry, we are confused.

    To better explain, the player character is already an active object and it is on a separate layer from the enemies, but there is a lack of "3D" to it because the player character just passes in front of an enemy.

    We are trying to get it so the player character moves in front of and behind an enemy... and can also "bump" into the enemy -- if that makes sense? So that when you touch the bottom portion of an enemy you get knocked back, but then when you touch the upper portion of an enemy you go behind it without getting knocked back/hurt. We don;t want to have to "split" any sprites up to do this because it would involve insane amounts of extra work.

    Sorry for so many questions, this is a particularly difficult hurdle for us, more so than any other so far. Thank you : )

  7. #7
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,300
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    The player character needs to be on the same layer as the enemies - not least because collision detection doesn't work for objects on different layers.
    The "Layer Object" is not an active - it's just a different kind of object that is used to handle layering (so you find it in the same list when inserting a new object). I believe it's included as standard, but if not, you will need to add it from the extension manager (press the "manage" button on the right hand side of the window shown when inserting a new object).

    As for the collision issue, I'm sorry, but there is no easy way to do what you want.
    You have three options:
    1.) Use 2 active objects per sprite - one would be the visible sprite, and the other an invisible collision mask.
    2.) Use "embedded collision detectors" - basically, you switch to a different animation frame which contains a collision mask, check for a collision, and then switch back to the normal animation frame again before the end of the event list, so the player never sees the collision mask frame.
    3.) Don't use the built-in collision detection system at all - instead, just compare the coordinates of objects (will only give you "bounding-box" collision detection).

    None of those options are at all straight-forward.

  8. #8
    Clicker Fusion 2.5

    Join Date
    Jun 2017
    Posts
    47
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thank you! I chose option 1. The only thing now is figuring out the knock back. I figured out how to do this, but the problem is.. I dont know how to make it so when you get knock backed it can be from all directions. Right now i only know how to make it so when you come from the right onto the enemy you get knocked back. How would i do this for all directions?

  9. #9
    Clicker Fusion 2.5Fusion 2.5 Mac
    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)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    772
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    The easiest might actually be to give all objects an alt. value and setting it's Y position, then always setting the order depending on that. I haven't tried this but try giving all your objects and enemies a Qualifier (e.g. enemies)

    always
    --->Set Alt. Value Y to Y("Player")
    --->Set Alt. Value Y to Y("Group.Enemies")

    Player alt value Y is lower than alt value Y enemies
    --->Move player order behind Enemies

    I think that should work.

  10. #10
    Clicker Fusion 2.5

    Join Date
    Jun 2017
    Posts
    47
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Definitely will try this, thanks so much.

Similar Threads

  1. Enemies with moving hitboxes
    By OHMwake in forum Fusion 2.5
    Replies: 3
    Last Post: 15th January 2015, 09:58 AM
  2. How to Order The Enemies in front/ behind my character? Whaaaattttttt!?
    By Kolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 18th August 2013, 01:33 PM
  3. Player character and block moving grid (example)
    By SpringUp in forum File Archive
    Replies: 0
    Last Post: 27th March 2012, 08:07 PM
  4. moving one active system box in front of the oher
    By therickman in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 29th September 2010, 08:31 AM
  5. Enemies aren't moving right
    By Fralex in forum File Archive
    Replies: 0
    Last Post: 20th September 2010, 11:42 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
  •