Copy Collision Mask to Each Frame

New releases and general discussions.

Post » Tue Jul 17, 2012 7:44 am

I have a question regarding the feature where you can make a collision mask in the animation tab and then copy it to each frame...

Is it an obsolete method? Initially it worked great for me, but in revamping the sprites for my main character, their size changed, and I therefore wanted to change the size and position of the collision mask to make the collisions as precise as possible. But when I created the new mask and copied it to each frame, Construct became very buggy. At first the player just keeps falling through the floor; the sprite literally has no collision now unless I change it to bounding box or anything aside from per pixel. I tried everything from making every hotspot the same (Which I do anyway) to making sure everything was the same exact size, but the problem remains. Even more curiously is that Construct will just close without asking if I want to save after this if I close the program.

I read up on other threads in the past where people were having similar problems, and it was never solved from what I could tell. People just acknowledged it as an annoying bug. I then read that this method was outdated.

So my question is: Is there a better way to be doing this? It just seems like too much hassle, and I'm sure many people have found better ways...Jim152012-07-17 07:47:11
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Tue Jul 17, 2012 9:40 am

There is no better way, but there are two other ways, that should be preferred.
The first one is simply seperating the image from the mask by using two objects. One shows the image, one serves as a mask.
The second way is using the "launch explorer" option by right-clicking on selected frames in the animation tab. This will export all selected frames and their masks as seperate images, that you can change as you like and then re-import. Here's a video from David showing it: http://www.youtube.com/watch?v=5H4KHhJs3ss
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Tue Jul 17, 2012 6:13 pm

Not what I wanted to hear of course.

I've heard a lot about the "Dummy sprite" method and it sounds like it works the best, but I'd have to change all of the events involving my main character, which will kill some valuable time.

I wish the copy collision mask feature could be fixed, because it's by far one of Construct's most useful features. Oh well. :(
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Thu Jul 19, 2012 3:21 am

Actually, it used to work great. Every time I've done it recently, though, it just puts in a blank image for the collision for all of them (thus no collision).
B
90
S
32
G
14
Posts: 935
Reputation: 14,540

Post » Fri Jul 20, 2012 12:17 am

It's the same for me, but it was only after trying to use the feature for a second time that it started happening. In other games it was working fine.
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Tue Aug 07, 2012 6:37 pm

I wonder if there's even a slight chance of this getting fixed. I just switched back to classic after getting annoyed with construct 2, but I had forgotten how buggy it was.
B
12
S
7
G
3
Posts: 5
Reputation: 2,290

Post » Fri Aug 10, 2012 3:10 pm

Personally I only use the collision mask for gameplay ingredients and environment. After A LOT of experimentation I found the quickest method to update, sadly, is to delete and recreate the object. After a few manipulations the collision mask just won't answer anymore. THis is also where I had the most editor crashes with construct so I put biohazard gloves whenever I start fiddling with this.

For the main character I can't imagine how I would use collision masks. I got a lot of script running for the collision and a lot more just for the visual of the character so they need to be independant. It must be very complicated to manage the two with the same sprite no doubt. For you it might be a change for the better, especially once you begin to have a lot of animations to manage.

CHeers!
B
4
S
2
G
2
Posts: 108
Reputation: 1,366


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests