Just rotate one instance of many?

Get help using Construct 2

Post » Fri Aug 23, 2013 4:00 pm

I am making a game (no need to explain what about, it's pretty obvious) An d i have come across a problem.

Download Herehttps://www.dropbox.com/s/0jb8guw7ohoglvn/PhysicsGame.capx

The problem is that when you rotate an object (do this by clicking on an object for 0.5 seconds and then it will rotate to your mouse/touch input) and then slide your cursor onto another copy of the object (import new copies of the object by clicking the platform button at the top and then clicking where you would like it to spawn) that starts to rotate to your touch/mouse input as well.

    I want it so that you can only rotate one instance at a time and that when you slide your mouse/finger over another copy of the object whilst rotating another, it won't start to change the angle of it.
Posts: 16
Reputation: 282

Post » Fri Aug 23, 2013 4:12 pm

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
Posts: 6,160
Reputation: 19,775

Post » Fri Aug 23, 2013 4:23 pm

The problem is that in your code you're just telling the platforms that, if the player is touching the screen, the platform should move or not, but you're not telling WHICH platform should be moving or not.

To select an instance so it works you have to either use a "pick" condition (like platform -> pick nearesth/furthest) or use the "on object clicked" condition so it picks the platform you've clicked on.

Here's the capx: https://dl.dropboxusercontent.com/u/2383513/linkedOUT/PhysicsGame.capx

I've also made the platforms rotate only if you click on it's borders, hope you don't mind! I made 2 different image points on each side and compare them to wherever the player is touching, so if the distance between the touch and the imagepoints is less than 30, it rotates instead of moving.
Posts: 857
Reputation: 28,485

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 25 guests