Replying to:Krondelo
Nice, but I think there is a problem with formatting where you show the collision box, it's not a box. Also I think you should try and explain how to use SPSCALE and how it effects the collision.
Wow, really? How is it shaped?
Root / Submissions / [.]
ACLS SPSET 0,17 SPCOL 0,TRUENow I'll break down the code. SPCOL: The zero is the management number, TRUE means you want the collision area to grow or shrink depending on SPSCALE. Here's a visual of how the collision works. 1 is one sprite and 2 is another.
|-----| 1 | 2 | |_____|The square is the collision area of 2 and it would be bigger or smaller if you used SPSCALE and said TRUE in SPCOL. I hope I explained that well, because we're moving on!
ACLS SPSET 0,17 SPCOL 0,TRUE WHILE 1 SPRITEBEINGHITVARIABLE=SPHITSP(0) WENDSPRITEBEINGHITVARIABLE can be replaced by any variable, but the zero is the sprite that is touching something, or will be. SPRITEBEINGHITVARIABLE will be equal to the management number of the sprite it's touching. Pretty simple right? So you can have a sprite that you control, and if the hit variable is equal to a spriite that's an enemy, then your health would go down. And any other uses you can imagine! (that are also possible.)
ACLS SPSET 0,17 SPSET 1,17 SPCOLOR 1,#MAGENTA SPOFS 1,32,0 SPLINK 0,1 SPOFS 0,100,100Notice how they both move even though only the blue one was told to. They're inseparable! And also linked together... Let's tear them apart in the name of coding! But not before explaining SPLINK and SPCOLOR. SPLINK is pretty simple, it links one sprite (0), to another (1). That's it! SPCOLOR turns a sprite(1) to a specified color (#MAGENTA), although you can use RGB to get a VERY specific color.
SPUNLINK 0 SPOFS 0,0,0Now they're separated! You can reattach them if you want.
LOAD"GRP4:GRP_NAME"