Collision Problems with Run-time Loaded Animations

This forum is currently in read-only mode.
  • So, I'm working on my game, and I have it set up to where it will load the tile-sets for maps externally. The problem arises when the images are loaded during run-time using the sprite's "Load animation from file" action. Whenever they are loaded like this, the collision mask remain unchanged, even when they are set to per-pixel. This poses problems when the loaded tile is a ramp, but the collision mask remains a square. Is this by design, or is this a bug that needs to be fixed? Thanks.

  • So, I'm working on my game, and I have it set up to where it will load the tile-sets for maps externally. The problem arises when the images are loaded during run-time using the sprite's "Load animation from file" action. Whenever they are loaded like this, the collision mask remain unchanged, even when they are set to per-pixel. This poses problems when the loaded tile is a ramp, but the collision mask remains a square. Is this by design, or is this a bug that needs to be fixed? Thanks.

    I do believe you can change the collision mode during runtime as well... have you tried that, or did you try to change the item properties in the design view?

  • Loading collision masks from files is not yet implemented. I'll try have done something about it by 1.0.

  • A workaround could possibly be to use invisible "detector" objects which are spawned relative to the number of "ramp" objects. The detector object would not need to be loaded from a file, it would be built into the runtime, therefore the collision mask would stay as "per-pixel". You could then tie the detector to the object being loaded from file using some simple events (detector.xy = object.xy).

    This was a trick I used to apply (when I used MMF2) to objects that I wanted to collide with other things using different effects etc. for whatever reason.

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I actually found a work-around to this shortly after posting. I just have the objects pasted onto a canvas and have the collision mask update. Unfortunately, that method only works on mid-high range machines. It doesn't work on either of the crappy computers in my house, just my good one. I'm gonna have to post it later to see if anybody else with an older computer has problems with it.

    Also, hope to see something about loading collision masks soon, then.

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