Lane Shifting and Ignoring Objects

This forum is currently in read-only mode.
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • I'm trying to build a beat-em-up similar to Guardian Heroes from the Sega Saturn or Panzer Bandit on the PSX and these work via multiple lanes, that is instead of being able to move up or down one wide lane like in Final Fight or Streets of Rage, there's two or more lanes which all act as a 2D field where you can move left and right along with jumping and crouching.

    I've tried what Daiz recommended in and that kind of got the lane shifting mechanic working except that it seems to apply globally to anything with a platformer behaviour (if any other players are around, they'll probably shift lanes too).

    Is it possible to have an object ignore families or other objects with a specific attribute? That's the only way I can see this working right so that the players can shift lanes and if there's any enemies on lane 2 and the player is on Lane 1, neither one will be able to affect the other.

    If there's a better way to achieve what I'm trying to do, I'm all ears too. I'm pretty new to Construct and I'm open to learning how to use it better.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Off the top of my head (and sorry if I'm maybe misunderstanding the question...), I would personally use Private Variables.

    I would give every object a Private Variable like 'myLayer', and set up a few events that change this value when you move to a new layer. Then, whenever I was doing a check for collision or what-not, I'd simply add a condition to check for the Private Variable. You can even check to see if 'Player1.'myLayer'' is equal to 'Enemy1.'myLayer''... so if the player collides with the enemy AND their layers are the same, then the action can be performed.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)