Collision mask not working

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Particles support animations, collisions, effects and etc.
  • I'm new to construct and I'm going through the book that Jayjay released.

    I've got a scene here I'm setting up and I have a little tiled background object that looks like this:

    <img src="http://i48.tinypic.com/16j3ocm.jpg" border="0" />

    Now obviously, you can see my little test guy is hovering above the ground because of the grass being at the edge of the picture border, but what he really needs to do is sit behind it on the ground.

    How can I use the Collision Mask button in the Picture Editor to achieve this?

    I've tried clicking the collision mask button and erasing the grass part off the top and then saving, but it keeps doing the same thing.

    I'm not sure how this button works, any help would be greatly appreciated.

    Thanks!

  • Hey thanks for reading my book! <img src="smileys/smiley4.gif" border="0" align="middle" /> How're you finding it? <img src="smileys/smiley1.gif" border="0" align="middle" />

    Looks like it's not running in administrator mode (so it doesn't have permission to access the files), are you using Windows Vista or Windows 7 or 8? If so, try right-clicking Construct Classic and select "Run as administrator" instead.

    Also, if you run into any issues along the way feel free to send me a PM too!

  • Well yeah, I noticed it said that in the book too, so I did that, but it still doesn't seem to be doing anything.

    So as you can see here, this is the original image.

    <img src="http://i48.tinypic.com/34tbpu8.jpg" border="0" />

    Then I tried two things; The first being just erasing the top grass pieces for the collision mask (as you can see here):

    <img src="http://i48.tinypic.com/2hhhkkg.jpg" border="0" />

    That didn't work, so then I even tried cropping the top portion off, and it still didn't work:

    <img src="http://i48.tinypic.com/2qx49i9.jpg" border="0" />

    So I'm still unsure...

    As for the book, it's really good so far. I'm only on page 77 so hopefully it starts to get into a good bit more detail as I still have unanswered questions in my head.

    For example, I've only made a small sample game on a 1000 x 800 frame so far obviously, but for games like Metal Slug or Contra that have lonnnggg levels that go on and on, are they using a gigantic layout like 12,000 x 800 to stretch for a very long time and setting up their level that way? or are they linking layouts together somehow...

    So hopefully questions like that will get answered, but I'm highly enjoying the book so far.

    One other thing I don't understand that I don't think the book will cover is using sprite sheets with Construct. To my understanding so far, sprite sheets don't work with Construct, so if I found a sprite sheet online that I wanted to use of a character for example. I would have to manually chop up all of the sprites needed for the various animations in Photoshop, and then load all the frames in, inside the animation window?

    Thanks Jayjay

  • Hi,I found that using copy collision mask to all,in the animator window,does not work for me,either,but double clicking on my sprite in the layout,does...could it be that you have collision detection set at "bounding box",rather than "per pixel",in your properties?,hope you get it sorted.

  • Thanks for the input pixel perfect, but I checked it, and it is a tiled background object rather than a sprite, so it doesn't give me the collision options under the properties tab like a sprite does.

  • No worries,new to this too...I think a tiled background does not support custom collision detection,it is basically bounding box collision or none.use a sprite to test.

    If you need to use tiled backgrounds for optimisation reasons,you could put the grass on a tile with no collision and place it in front of your "platform",with collision switched on to give the same effect.

  • Ah that explains it then, unfortunately tiled backgrounds only have box shaped collision masks. You can use a sprite and set it to invisible for the collision masks instead though and it won't cause noticeable latency.

    To start, create them in the level editor for each tiled background, but once you're comfortable with events you can create and position them at each tiled background object during the start of a level.

    Also, chapter 9 in the book has examples not covered in the main games such as editing collision masks if that helps <img src="smileys/smiley1.gif" border="0" align="middle" />

    On spritesheets, you can right click in the frames pane of the Animator settings tab and click "Import frames" and select an image to import or use the additional options to split the image into separate tiles.

    It has some advanced editing features before final import as well, such as choosing a custom background color to erase (colour mask), or rotating individual image/tile pieces.

  • How do i turn the collisions off altogether on the tiled background object, so that I can use a sprite for collisions instead?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm, if you remove the attribute "Solid" from the tiled background that should work.

  • That works! Thanks a bunch!

    I have a separate question that I can't figure out at the moment that you might can help with.

    I'm trying to make particles follow a sprite, and i want them to react like physics so when the character moves, they flow from out behind him, but when hes just standing there, they just spawn around him.

    Any ideas on how to achieve this?

  • I also found some really cool resources and examples of various things on this forum, but they all seem to be in .capx format. I guess there's no way to open these and take a look at them huh? Construct seems to only open .cap files these days.

  • I also found some really cool resources and examples of various things on this forum, but they all seem to be in .capx format. I guess there's no way to open these and take a look at them huh? Construct seems to only open .cap files these days.

    .capx files are--and have always only been--compatible with Construct 2.

    Construct Classic only opens .cap files.

  • Ahh, gotcha. I thought it might have been an older file format. Thanks!

  • That works! Thanks a bunch!

    I have a separate question that I can't figure out at the moment that you might can help with.

    I'm trying to make particles follow a sprite, and i want them to react like physics so when the character moves, they flow from out behind him, but when hes just standing there, they just spawn around him.

    Any ideas on how to achieve this?

    Glad to hear =) and by react like physics do you mean have them bounce off objects they touch? If not, then this might be what you're looking for: https://dl.dropbox.com/u/4714446/ThrusterParticles.cap

  • For some reason it wont let me open this file, it says:

    "Failed to load application: This file was saved in a newer version of Construct and cannot be loaded by this version."

    But i have the r1-2 latest version. So...not sure what's up with that.

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