OUT allows a function to return multiple values.
A normal function with one output might used like QUAD = FINDROOT(X)
using OUT returns multiple values to the variables specified, such as GIVE3NUMS OUT N1, N2, N3
STICK returns two(?) positional values, so OUT maps them to two(?) different variables.
STICK OUT and SPSET
Root / Programming Questions / [.]
Alan_RaterinkCreated:
1. This is a simple one. What does the "OUT" phrase mean in the command "STICK OUT?"
2. What is the difference between SPSET and SPDEF and when do you use SPDEF?
Thank you!
this might be late but SPSET takes the sprite and places it down with its coordinates at the default top left corner. SPDEF just changes the sprites definition, the sprite image not anything else so you can change the SPDEF and have the sprite stay in the same position as you had it before.
Yeah as for spset and spdef-each one has a heirarchy.
You have an instance, usually the initial instance, when spset will declare the space for your sprite. The spset saves the definition to the memory i think.
Spdef states-within a newer/older memory location. The main instances of spdef are- what your gpage of sprites (i.e. sppage); the coordinates where you expect the graphics to be on ur gpage; the definition number along with it's defined middle (i.e. sphome); and finally, it's attribute.
~>which parts are shared are considered commonalities. I can't explain tho as I haven't grasped it, but I will try to list where they overlap in the code system.
1. Spdef and Spset will both change soon as you change ur sppage.
2. Spanim temporarily aligns spofs with spdef, therefore you may only change the sprites management number once per call, thus releasing the animation data, i think...
3. Spdef and Spset can be written in arrays, but management numbers stop at 512- definition numbers extend to management numbers to the power of 2.
4. Variables used in spset wouldnt behave as objects, and neither would variables in spdef, because theres no object in Smilebasic. lol
If anybody knows something isnt accurate, I have become personally fizzled out by this whole game.