Is it possible to test che collision/overlapping of a specific pixel of an object?
A condition of this kind:
if ActiveA (x 12 y 38) is overlapping ActiveB
then do something
not the entire object but a single pixel.
Thanks
Is it possible to test che collision/overlapping of a specific pixel of an object?
A condition of this kind:
if ActiveA (x 12 y 38) is overlapping ActiveB
then do something
not the entire object but a single pixel.
Thanks


Well you could use a 1x1 active and have it follow ActiveA at those points and test that instead.
Yes, I thought of that solution, but I have a lot of characters and each one of them has its personal little collider of 1x1 pixel used to test collision of the character's feet with a walkable area.Well you could use a 1x1 active and have it follow ActiveA at those points and test that instead.
I've created a walkable area with continuous scaling to simulate perspective, and it works very well.
But the problem is that I have an event for every single character like this:
when Collider1 of Char1 is overlapping the WalkableArea
then activate the continuous scaling effect on Char1
when Collider2 of Char2 is overlapping the WalkableArea
then activate the continuous scaling effect on Char1
etc etc for some...100 Collider/Characters!
I want to write -if possible- a single general event that handles them all. Qualifiers are not of great help:
when Group.Collider is overlapping the WalkableArea
then activate the continuous scaling effect on Group.Characters
...and the effect is applied to all the characters, not only the one associated with the collider.
I really would like to avoid using any collider and test the collision of the Characters at a hotspot/action point set at their feet!
I hope I was clear.


add the characters to a 'group' and Always set position of the single qualifier to the specified position of the character group. If you don't want to duplicate the 1x1 pixel thing you can have an event NObjects("detector") < NObjects("Group.whatever") : Create ("detector")
Then when testing collision, have the event test for not only the overlap of the 1x1 detector to whatever object, but the 1x1 to the group as well.
If you need me to explain better I could try, but I'm sure someone else might be able to say it better![]()
I'd only use a single 1x1 pixel collision test object, then iterate through the characters with a fastloop and move the collision one pixel object around to perform each text.
Another solution is to have an animation frame of each character that's only a single pixel, then switch to this animation frame when you test for collision, and then switch back to the previous frame and sequence and restore the animation, so that the collision mask is never displayed.
Your solutions are very engaging, thanks, I'm gonna figure out how to try them. Here's a rough illustration of the problem I have:
[img:center]http://dsgames.guerrestellari.net/walkable_mess.jpg[/img]
A walkable area, many characters each one with its personal little collider: only the colliders on the walkable area make their associated characters to be affected by the tint/scaling effects of the walkable area, not the others out of it.
Qualifiers/Groups don't work, you never get the separation between who's in and who's out of the area of collision, MMF can't select the individuals, conditions remain true even when they should not, it's a mess. That's why I wanted to eliminate the colliders and have directly the Active Objects to collide through their "feet" pixels, but I suppose that's not possible.
So the single collider + fastloops solution seems promising. The other one (switching between the normal animations and the single pixel frame) must be accomplished through fastloops too? Can fastloops prevent that hidden collision frame to be displayed?


Ah, I was hoping it would make it easier by testing for a double overlap, but apparently not. I've done it before, I guess its just not working for what you are doing.Originally Posted by Boba Fonts
Could you please help me to figure out how to do that?Originally Posted by Nifflas
Now I have
Collider1 overlapping WalkableArea --> Set effects on Character1
Collider2 overlapping WalkableArea --> Set effects on Character2
Collider3 overlapping WalkableArea --> Set effects on Character3
and I need to have a single Collider that iterates through all the characters walking around the room and overlapping (or not overlapping) the area in every moment.
Thanks in advance


It's hard to explain, I'll make an example later if you need it.
Basically spread a value in the characters (which can be put into a group) alterable value a or some other alterable value
Then:
all you need to do is addCode:* On Loop "pixel collisions" + Loopindex("pixel collisions") = Alterable Value A("character") // or ("group.whatever") - Set position of "collider" to {whatever position}
for the collision effectsCode:* On Loop
I definitely have a problem with fastloops: badly need to learn to use them!
I've tried your example but something is missing. Could you please explain it in detail? :blush: