Platform2 (Behaviours)

0 favourites
  • Platform2 — Now for sale in the Scirra Store!

    https://www.scirra.com/store/construct2-behaviours/platform2-4098

    Description

    Platform2 is a platform behavior for Construct 2 that was built from the ground up to ensure excellent performance whilst enabling features that are not available in the standard plugin: one-way doors, one-way floors –and- collision filtering.

    The behavior works against standard Solid objects so you can easily implement it into your project. One-way doors and collision filtering are enabled by an additional ‘helper’ plugin (Solid2, which is also included) – just add Solid2 to those objects that already have Solid and you can select the additional features.

    This plugin is also frame-rate independent, so you’ll get the same behavior no matter what refresh rate your player’s screen has, and it supports minify export (of course)!

    Actions

    -Set the number of air jumps

    -Set the collision category

    -Control input (up / down / left / right)

    -Set the edge behavior (Nothing / Move away / Move toward / Move nearest)

    -Set the edge behavior force factor

    -Set the gravity

    -Reset jump count

    -Set acceleration

    -Set deceleration

    -Set enabled

    -Set jump strength

    -Set jump sustain time

    -Set max fall velocity

    -Set max speed

    -Set velocity X

    -Set velocity Y

    -Set whether the jump velocity is adjusted for the vertical speed of the platform the player is standing on

    Conditions

    -Compare speed

    -Is edging away from an edge

    -Is edging towards an edge

    -Is falling

    -Is jumping

    -Is moving

    -Is on floor

    -Is on wall

    -Is passing through one-way door

    -Is passing through one-way floor

    -On fall

    -On jump

    -On landed

    -On moved

    -On stopped

    -On wall hang

    Expressions

    -Acceleration

    -Collision category

    -Deceleration

    -Gravity

    -Jump strength

    -Jump sustain

    -Max fall speed

    -Moving angle

    -Speed (overall)

    -Velocity x

    -Velocity y

    Use this topic to leave comments, ask questions and talk about Platform2

  • Updated to v 1.3

    Bugfixes - some collisions were being incorrectly filtered out and the one-way floors had a glitch. All now good.

  • Props to Colludium for being so fast with updates and eliminating issues! This behavior is very useful and is already saving me a lot of time setting up more advanced platform-style interactions.

  • Props to Colludium for being so fast with updates and eliminating issues! This behavior is very useful and is already saving me a lot of time setting up more advanced platform-style interactions.

    Thank you very much! I'm glad you like it and find it useful

  • This looks perfect for my project, currently I am using a modified platform behavior that checks for collisions based on layer, but it's old and I recently ran into a major issue with it where it doesn't appear to take simulated controls from a gamepad.

    I have a couple concerns specific to my game though. The project is a beat-em-up that uses a lane-depth system similar to the game Viking Squad (there is the illusion of depth like most beat em ups, but you are locked to a specific lane rather than free Y movement):

    So I need multiple instances (players and enemies) to only interact with the collisions of their current lane.

    Would this behavior support that?

  • jwilkins - your artwork is excellent!

    This plugin should suit your needs, for sure. You could set the collision categories and masks to filter the collisions for each lane.

  • Oh my bad, thats not actually my game, I was just using it to explain how the lane mechanic works in it as theyre similar, my game is not nearly at that stage of polish yet.

    I purchased the behavior and am in the process of implementing it now, I'm having some trouble making sense of how to filter the collisions though. Do platform2 objects and solid2 objects only interact with objects of the same collision mask or collission category? I've tried that but it's not filtering them yet. What do I need to be doing to get that work?

    EDIT: I am fairly certain based on the tool tip information provided that objects with the Platform2 behavior are only meant to interact with other Platform2 or Solid2 objects with the same Collision Category or Collision Mask, but this is not happening, all of Platform2 objects interact with all of the Solid2 objects regardless of the category or mask value

  • Oh my bad, thats not actually my game, I was just using it to explain how the lane mechanic works in it as theyre similar, my game is not nearly at that stage of polish yet.

    I purchased the behavior and am in the process of implementing it now, I'm having some trouble making sense of how to filter the collisions though. Do platform2 objects and solid2 objects only interact with objects of the same collision mask or collission category? I've tried that but it's not filtering them yet. What do I need to be doing to get that work?

    EDIT: I am fairly certain based on the tool tip information provided that objects with the Platform2 behavior are only meant to interact with other Platform2 or Solid2 objects with the same Collision Category or Collision Mask, but this is not happening, all of Platform2 objects interact with all of the Solid2 objects regardless of the category or mask value

    The mask and category number represent binary bit flags - if the flags, when AND'd, give '1' then they should interact, if they give '0' then they should not interact. I will do some more testing and get back to you - if the collision filtering is broken then I'll fix it this weekend.

  • jwilkins - it's my mistake - the filtering is broken. Give me a few minutes and I'll have a fix ready.

  • Update:

    Version 1.7 submitted to the Store for approval.

    Bug fix - collision filtering now works correctly.

  • Having a lot of success implementing this plugin but I did notice 2 errors, the first occurs when you disable then enable the Platform2 behavior:

    Javascript error!
    ReferenceError: inst is not defined
    http://localhost:50000/Platform2_behavior.js, line 1583 (col 5)
    
    This may be a bug in Construct 2 or a third party plugin or behavior - please report it to the developer following the bug report guidelines. Subsequent errors will be logged to the console.[/code:2ypwkcqz]
    
    The second occurred when trying to edit the Collision Mask values of Solid2 objects when those objects are created:
    
    [code:2ypwkcqz]Javascript error!
    ReferenceError: value is not defined
    http://localhost:50000/solid2_behavior.js, line 140 (col 3)
    
    This may be a bug in Construct 2 or a third party plugin or behavior - please report it to the developer following the bug report guidelines. Subsequent errors will be logged to the console.[/code:2ypwkcqz]
    
    Neither are project breaking for me but I wanted to document them here, this plugin is still amazing!
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the bug report, - both bugs have been fixed and the updated plugins should be approved for release in the store soon.

  • Does Platform2 handle 'ladders' (ropes/climbing) any differently? I'm quite new to Construct, and have been able to easily create a platformer, but struggled with ladders (even with a multitude of tutorials). Thought that if climbing were part of your add-on it would be a done deal

  • Does Platform2 handle 'ladders' (ropes/climbing) any differently? I'm quite new to Construct, and have been able to easily create a platformer, but struggled with ladders (even with a multitude of tutorials). Thought that if climbing were part of your add-on it would be a done deal

    Hi. There are no ladder or rope elements to this behaviour - you'd have to set them up yourself using events.

  • Update v2.0 submitted to the store for approval.

    Bugfix: no longer registers as next-to-wall if next to a jump-through or fall-through object.

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