Arrow pointing towards object outside screen.

0 favourites
  • 5 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • What I would like to have is to have an arrow on the side of the screen pointing towards an object when the object is not on screen. As to tell the player where the object is.

    I've tried doing it with an inverted Is on-screen event and then compare the objects X position with the players X position and if it is lower I have an arrow on the left side of the screen appear until the object is on screen again.

    I thought this might work until I realized, what if the object is below the player? That would mean there would be an arrow both on the left side of the screen and on the bottom of the screen.

    so does anyone have any clever ideas how to go about doing this? Ideally I would like to only use one arrow and it should always point towards where the objkect is if it is not on screen.

  • Seems to work fine in your example. But when I try to use it my example the arrow that should be pointing towards the object only stays in the top left corner. :/

    To make it easier to understand. The arrow stays in the top left corner and appears to be working correctly. Like pointing towards the object and all but it just doesnt stay at the edges like in your example.

    <img src="http://s16.postimage.org/rd9nfzbtx/tick.png" border="0" />

  • Your events all use ViewportTop when they should be the same as my example.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh wow...

    Guess if I feel stupid now. :P

    Does this look right?

    Also, I can add taht it is still doing the same thing as before. :P

    <img src="http://s9.postimage.org/on0biqhn3/tick2.png" border="0" />

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