[↑]
SmileBASIC4 Replica Reference
SPHITSP
1. Return sprite collision detection result

SPHITSP(SpriteNumber[,StartID,EndID])

・Call SPCOL in advance.

Argument

SpriteNumber

Sprite number to judge: 0 to 4095

StartID,EndID

Sprite range to detect (0 to 4095)

Return Value

Collision sprite number (-1 if no collision)

Example

H=SPHITSP(0)
2. Return sprite collision detection result with specified sprite

SPHITSP(SpriteNumber,OpponentSpriteNumber)

・Call SPCOL in advance.

Argument

SpriteNumber

Sprite number to detect: 0 to 4095

OpponentSpriteNumber

Opponent sprite number: 0 to 4095

Return Value

0=No Collision, 1=Collision

Example

H=SPHITSP(0,34)
3. Return the sprite collision detection result from the previously set information

SPHITSP()

・If there are multiple collision destinations in SPHITSP with arguments, all collision destinations can be retrieved by calling again with the arguments omitted.
・Call SPCOL in advance.
・Call SPHITSP without omitting arguments in advance.

Return Value

Collision sprite number (-1 if no collision)

Example

H=SPHITSP(0)
WHILE H>=0
 H=SPHITSP()
WEND
About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|