How can I get the direction of the opponent object when two identical (another instance) objects collides?
A with B = get direction of B into A's list
B with A = get direction of A into B's list
cf25_b293_1_get_dir_of_opponent_object.zip
How can I get the direction of the opponent object when two identical (another instance) objects collides?
A with B = get direction of B into A's list
B with A = get direction of A into B's list
cf25_b293_1_get_dir_of_opponent_object.zip
The problem is that there's no real order of which one collided with the other
This order is usually defined by the creation order, not "who started the collision"
Technically the two collided at the same time.
Well, If you don't care who collided first, you can do it this way:
Instance Collision.mfa
Hi, try this, see if it what you need,
I added a behaviour to the ball and qualifiers to the ball and list
Åiô-æèÄÞé¦ò¹î³é*ĵô¥_mod.mfa
On my example, I added to the list the fixed value of the object that it collided with, but you can get anything you want from that instance and add to the list, for example the direction.
stiggits , I'm not sure if yours is accurate, I mean, it may just be adding the direction of itself on its own list, or worse, adding to a random list, I believe you can't really do this trick with a object colliding with a qualifier that have the same object... Cause it can't really differentiate the qualifier to the object...
Here's a simple debugging of your concept, it doesn't work as expected, and using a qualifier or behavior makes no difference.
Detect who it's colliding with.mfa (This example doesn't work properly, it simply adds itself to its own list, it's just to show what's happening behind stiggits concept)
Please check my example on the previous comment, it loops through the objects and temporarily store its data so it can scope the opposite list object.
Thanks guys. For now, I have solved the problem because I found out that if I start ForEach loops when objects collide, only they will be targeted.
cf25_b293_1_get_direction_of_opponent_object.mfa