I have a problem:
On this project, I added an on-screen variable. However, I had a title screen, and used the "show variable" block.
However, while I wanted my variable to appear on the bottom right of the screen, it appeared on the top left. Yes, I tried dragging it.
So my question is this: How do I make non-on-screen variables?
(I have my number sprites, but I need to know how to script them to synchronize with the variable. Can anyone help me with this?)
Offline
If you mean that variables always appear in the top left, if you save the project while the variable is visible, it will auto-reappear in the spot it was when you saved the project when you use the "show variable" block. So you really don't need to create your own variable at all, if that is all you're worried about.
If you want to create your own variables which can move, don't require an orange border, etc., you can code your variables a variety of ways. In your case, the simplest way would be to make a sprite with the costumes starting at 0 and going up to 30, or whatever the largest number you'll ever need to display is. Then make a script like this:
There are more complicated ways that use multiple sprites or stamping, but this script should work.
Last edited by Lar-Rew (2011-01-17 09:15:53)
Offline
OK. Sorry, haven't checked this post for a while, thanks. You were a great help!!!
I'm currently updating my project. That's exactly what I needed.
Offline