When Grab is pressed the nearest object changes its position to Neu.Point (Neu is my character), and when Grab is released the object’s position is changed to current position of Neu, kind of like dropping it.
For my centrosome left and right I have an “anchor” for them so when Neu drops them and it collides with the anchor, they stay to that anchor.
The anchor are these small blue and red boxes to the farthest opposite sides.
Now, if the player puts the CentrosomeRight to the left anchor and the CentrosomeLeft to the right anchor. I still want the centrosome to stay on whichever anchor they are collided with.
So I did this event below, I considered the possibility, and it works:
My problem is that when the centrosome is anchored to the anchor, Neu shouldn’t be able to pick it up. In my code, when a centrosome is on the anchor, that particular centrosome won’t be picked up anymore. But, the other centrosome also can’t be picked up even though its not on an anchor yet.
In the first event, you have a copy of those events for left? I’m not seeing any reason why putting a centrosome on an anchor wouldn’t let the other centrosome move. Unless the variables needed to move a centrosome (Begin and IsHolding) aren’t getting reset after dropping the first object. So in the events where the centrosome is in collision with the place markers, are these sub events to “Button grab was released” event? If not, maybe the event you used in the first picture to set IsHolding to false is not being done, so Neu can not carry anymore. If you carry a centrosome around and drop it somewhere that is not an anchor, can you then go to the other centrosome and carry it around?
Now this next problem is because there is no event saying “Neu can’t carry a centrosome if it’s already been placed”. You could add a new condition that Neu can’t carry a centrosome if it’s in collision with an anchor.
It might work better if the x position of centrosomeRight did not = the x position of the anchor right or left. Right now it looks like Neu can only pick up CentrosomeRight if it is in the same x position as anchor right or left.
But did you not find the CentrosomeRight is in collision with (inverted) condition or is it not working as expected?
The collision checks should not be in an OR statement, they should both be true, it’s not in collision with any anchor, left or right. However, that may not be the only problem depending on what you mean by not working as expected. Take them out of the if statement, run it and let me know what it’s doing.