|
From what I read, it seems you want to know how to place the name of the object/sprite into your code, correct? If so, it's really simple
Let's pretend you have an item called objMario
if you want a variable (let's call it location) to have the value of said object, you do this:
If an object by the name "objMario" exists, the name should turn purple.
so if you want cursor_sprite to = eggroll sprite, you do
| CODE | | cursor_sprite=eggroll |
As a warning, make sure NO TWO OBJECTS SHARE THE SAME NAME. If you do so, then you may get glitches.
For example, if you had an object and a sprite, and both were named Mario, and you decide to do:
This would most likely not work, since the object Mario isn't a sprite, and would therefore, cause an error.
In which case, it's best to put a small abbreviation in front of your names. Here's a nice way to organize: spr = sprite obj = object bck = background snd = sound pth = path scr = script rom = room fnt = font tml = timeline
Don't make them unnecessarily long. Up to 3 letters is good enough. And so on. This way, you can have an sprMario and an objMario, with none of the errors.
|