Hello,
I'm trying to implement a kind of visible timer in a game I'm working on; that is, a thin horizontal bar stretching the whole length of the screen while a small sprite moves to the left every few seconds. Here's a picture:
(http://img268.imageshack.us/img268/3562/barct.jpg)
I did it by making the bar and the cursor both seperate GUIs, setting them on top of each other, and using a small script for the movement. The movement part works fine, but I want to have the cursor GUI start at the very right-hand edge of the screen; at the moment if I set the x-coordinate to anything above 319 it says it's out of range but if I set it less it comes up too short, starting at the position in the picture. The game is 800x600, and I used the 400x300-res coordinates for the bar GUI and it worked out fine, but I can't get the bar GUI where I want it!
I'm sure there's an obvious reason I'm missing but at the moment i got nothin :P
Thanks!
Anything above 319 sounds like you're using low res coordinates with a 640 width screen? I honestly don't know.
But one thing you could think about doing instead of a GUI on top of another GUI for the marker. Just place a button in the GUI, with a graphic, and move it around with the buttons X coordinates.
Ah, that works perfectly, thank you! I knew there was some better way to do it but GUIs are still kind of a closed book to me for the most part ;D
The GUI you are describing is a Slider. Simply create a new GUI, add a slider, change the background image and the handle (you called it cursor) image, select the min & max values, and then set the slider value to the max value.