Hovering indicator on hud.

Get help using Construct 2

Post » Mon Dec 21, 2015 12:11 am

I need an indicator on my hud that hovers above an object, but when the object is out of view, it moves to the closest edge of the view to the off-screen object.
B
3
Posts: 9
Reputation: 195

Post » Mon Dec 21, 2015 12:52 am

Could you better explain what is happening right now and what you would like to happen?
If you could tell us what behaviours/events are you using, it would be a lot easier to give advise on what to change..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 21, 2015 8:18 pm

Prepare for my highly advanced animation skills. (No, its not real life, just an animation. I know its pretty good)
B
3
Posts: 9
Reputation: 195

Post » Mon Dec 21, 2015 8:22 pm

The green thing is what I want
Image
B
3
Posts: 9
Reputation: 195

Post » Mon Dec 21, 2015 8:26 pm

And what part of this are you having issues with?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 21, 2015 8:30 pm

I don't know how to do this.
Edit: This is just an animation made with Stykz.
B
3
Posts: 9
Reputation: 195

Post » Mon Dec 21, 2015 8:39 pm

One way to do this is to clamp the X, Y values to the screen edges after moving it to the spot above the character. So if X + arrowWidth > screenWidth, x = screenWidth - arrowWidth, etc.
B
15
S
3
G
1
Posts: 15
Reputation: 839

Post » Mon Dec 21, 2015 8:53 pm

captaincatnip wrote:One way to do this is to clamp the X, Y values to the screen edges after moving it to the spot above the character. So if X + arrowWidth > screenWidth, x = screenWidth - arrowWidth, etc.

Thanks! I'll try that!
B
3
Posts: 9
Reputation: 195


Return to How do I....?

Who is online

Users browsing this forum: David181 and 25 guests