LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

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!

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.

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.

STICK OUT x, y they range from about -.875 to .875 SPSET id, definition creates a sprite using a preset definition SPDEF definition, x, y, width, height creates a definition to be used with SPSET (you can also just do SPSET id, x, y, width, height)

The range is exactly -.875 to .875 both axes so I personally normalize them to 0 to 1 by dividing by .875