[Solved] Outlining won't work no matter what I do :(

Is there an exclamation mark error below the list of points? The top part of the mask looks concave. If mask is not convex, it will ignore the custom mask. If it is showing an error, you need to make the top straight.

What @Keith_1357 wrote is correct. To add to that, you can define multiple collision masks/areas for a sprite.

So instead of this which brings up the error:


create multiple collision masks by clicking on the “Add collision mask” button to create more collision boxes (the masks can overlap, I just didn’t here so it’s easier to see and understand):

Oh yeah I think that’s the problem, thanks! Do you think making the mask bigger or smaller is better? (so that the top is straight)

Oh I see, thank you!

I don’t think it matters. Unless you think people will need to click that close to the edge. I think most people (including me) overestimate the need for a perfectly matching collision mask. It’s usually just a few pixels.

Ok thanks! Though the hovering still doesn’t work when I do preview, idk what the problem is.

Can you post a pic of your current events?

Here:

It should work. You changed the animation so it’s not concave? And if the animations don’t share the same collision mask, you adjusted it for both animations?

Can you post a pic of your scene? I’m running out of ideas.

To add to @Keith_1357 request, can you also add screen shots of the collision masks for both animations?

The collision mask is set to apply for both so it’s the same as the screenshot I sent :')

Here!

The collision mask in your screen shot was incorrect.

And what do you mean exactly when you say hover doesn’t work? The animations don’t change, or something else?

I changed the collision mask so it’s 2 collision masks now:

And the animations do change but the white outline only goes away when the mouse is completely off the game screen. It’s supposed to change when it’s off the object

I could’ve sworn I tested your code. I must not have used a mask. **cursor is on object" ignores the collision mask. It just checks the bounding box. You can use point is inside

It looks like it the condition did use the mask in v4 but it was removed. The accurate option does nothing and was planned for removal.

Tysm! Though I’m confused as to how I’m supposed to set the “point is inside” up. The thread you linked says I have to crate a spirte for the mouse?

The mouse object technique was just 1 option.

You can use point is inside

From my post:

Thank you it works now! Do you also know how I can make it so that the animation changes to a different image when I click it? I tried but it only shows the image when the mouse click is released and disappears right after, I want it to stay like that

1 Like

I’m assuming you’re doing a classic point and click adventure game. I love the style but I’ve never tried making one.

You could use variable(s). I’m just not sure on the best strategy. You could use a global variable.

If global variable DoorIsOpen is false
(Subevents)
–point is not inside no highlight
–point is inside highlight
– point is inside and mouse is down set global variable DoorIsClosed is true

If global variable DoorIsOpen is true
(Subevents)
– show next image
– if point is inside or clicked do something

This method isn’t easily expandable. You could switch to the next scene when this image is clicked. Maybe a new scene for each room. IDK. As I said, I’ve never made this type of game you could then use the same technique.

IDK. I would search the forum or the web.

Thank you so much you’ve been rlly helpfull!

1 Like