troubles with mouseX/Y on different layers

This forum is currently in read-only mode.
  • I'm not sure how to make a mini-map like in starcraft - and before you mention the mini-map object, what I mean is a map that I can click on, that will cause a layer to scroll to that location. This is probably a really easy question but for some reason I can't come up with a solution.

    The reason is that I have the map on a non-scrolling layer and the main window on a scrolling layer, and mouseX/Y always returns the result for the scrolling layer, so mouseX/Y is useless in this case.

    I also can't place objects at the mouse location on the non-scrolling hud layer because the x/y is different than the scrolling layer.

    Perhaps a parameter like mouseX(layernumber) would help in situations like this? (Though it would be best if it were mouseX(1) when it first appeared, because that's what most people will be using it on, so they wouldn't have to select "layernumber" and edit it every time. Then it would still work as normal, with extra precision if needed.)

    Though if there's a way to work around this, that would be great too.

  • [quote:2pi7jdls]Perhaps a parameter like mouseX(layernumber)

    That's already implemented! You can also use MouseX("Layer name")...

  • Uh... Well then! I guess it was a good suggestion!

  • That's already implemented! You can also use MouseX("Layer name")...

    Ashley: Btw, is there already implemented a general position "translation" between layers? I'd like to compare position of an object that is on zoomed and rotated layer, with another object's position but the coordinates are not really comparable because of the zoom and view angle... is there any solution?

    Edit: Oh, I noticed just that when layer is rotated, even MouseX("layer") doesn't show the real cordinates. I guess than it's not yet implemented?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Edit: Oh, I noticed just that when layer is rotated, even MouseX("layer") doesn't show the real cordinates. I guess than it's not yet implemented?

    It should work. What's wrong with it?

  • It should work. What's wrong with it?

    I posted a cap demonstrating the bug into the tracker: http://sourceforge.net/tracker/download.php?group_id=207820&atid=1003219&file_id=292232&aid=2094635

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