Hi all, thanks for viewing.
I have looked at several topics regarding distance and such but could not find any solution for what I want to do.
I am working on a vertical scrolling shooter, and have been trying to make an indicator that shows how far along you are in the layout.
Here is what I thought might work:
I have a background bar, a progress bar, an arrow, and a scroller sprite (with scroll to behaviour).
I would like the arrow to always stay within the boundaries of background bar, starting at the very bottom and finishing at the top.
To achieve this I figured I could set the height of the progress bar relative to the scrollers position, the LayoutHeight, and the background bars height, and then set the arrow to the bottom of the progress bar.
|System Every tick|
barProgress - Set height to (Scroller.Y / LayoutHeight) * barBack.Height
arrow - Set Y to barProgress.Y + barProgess.Height
This is pretty close but never accurate and the results differ slightly depending on the layout height.
Here is a capx that demonstrates what I am trying to achieve. (Requires R155)
Thanks for any suggestions.