Point overlaps Point.[solved]

For questions about using Classic.

Post » Wed Jul 16, 2008 6:45 pm

It would be nice if we had this option.

But besides that, what I'm trying to accomplish might be simple, so I'll ask -- How would I set up my events to make it so my detector can do this:

edit- new pic

...With every box family I add no matter the size at runtime.

Keep in mind this view isn't top down or platform, its in between the two and it's faking Z depth. And all my boxes will have a totally different sprite/look.

Since there is no "point overlaps point", I don't quite see how I could do this without having to add thousands of width and height sprites to overlap (although, I might be missing something). I want to use the right green box sprite to stop the character from going left into the box, and bottom darkred sprite for going up inside and vice versa for top and left. And no, solids don't work for this, I'll just have to add a cap for you, because you probably won't get why otherwise. If you download the cap go under the sky sprite and hit the shift key. This you cannot do with "solid" and these boxes aren't might to be solid anyway, I want some other objects to do some separate things with solids.

(Which leads me to another question, can I use solid in events? if not please add the options. So I can do -- IF "object" COMES IN CONTACT WITH "solid" - DO STUFF.)

[solved]new features like overlaps at offset and collision masks make this not so much a problem
Posts: 259
Reputation: 1,968

Post » Wed Jul 16, 2008 7:33 pm

You should be able to see Solids and other attributes in object parameters, so you can set up an 'Object overlaps solid' type event.

As for 'point overlaps point', a point is just a co-ordinate with no size or dimension. Two points can only be said to overlap if their X and Y co-ordinates are identical. Due to rounding errors, you might want to round the coordinates to test if they overlap to pixel resolution.

In other words, you can use compare values like so:

+ Round(x1) equals Round(x2)
+ Round(y1) equals Round(y2)
-> Points (x1, y1) and (x2, y2) overlap
Scirra Founder
Posts: 24,895
Reputation: 198,608

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests