Just rotate one instance of many?

0 favourites
  • 3 posts
From the Asset Store
Simple resize and rotate events for any sprite, quick and easy event sheet that you can use for your own projects.
  • 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.

  • Why 2 topics?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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: 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)