It is orange and looks like a variable because it is a variable. As luiysia said, if you imported the script, you may have to make the variables. You may even have to replace all of them with exact duplicates, I'm not exactly sure . I think private variables that don't exist are automatically created though.
If you're trying to make your own script, your velocity just hold a number, which is the amount that your sprite changes each frame (e.g. if the x-velocity is 4, change the sprite's x position by 4 each frame).
Offline
MoreGamesNow wrote:
It is orange and looks like a variable because it is a variable. As luiysia said, if you imported the script, you may have to make the variables. You may even have to replace all of them with exact duplicates, I'm not exactly sure
. I think private variables that don't exist are automatically created though.
If you're trying to make your own script, your velocity just hold a number, which is the amount that your sprite changes each frame (e.g. if the x-velocity is 4, change the sprite's x position by 4 each frame).
Thanks!
Offline
There are lots of different methods for velocity, but I prefer to use one I made up myself. It's a little more complicated than other methods, but I think it works better as you can choose the maximum speed as well. I'll just go and create it and take a screenshot of it.
EDIT: Got it!
Sorry about the poor quality, I've just realised I saved it as a JPEG instead of a PNG...
Last edited by RedRocker227 (2011-12-01 12:02:39)
Offline