Tip: When determining a time limit, remember that players won't be as familiar with the level as you are. If you normally complete the level with the timer around 100, others might run out of time on their first try.
This code allows Mario to summon the closest carryable sprite, horizontally, into his hands. The closest sprite will be put into his hands instantly as long as he isn't already holding something, and it will also detect kicked sprites. Could be useful for puzzle levels, or Kaizo levels involving summoning sprites in a tight order to perform specific tricks.
Summon is performed by holding X or Y (by default), then tapping L or R.
Usage note: If using in your hack, it may be wise to let the player know that it only measures horizontal distance, not vertical.
Update v1.1: Bug fixes, and made some of jankier "features" of the code into optional defines. Also made a few small optimizations, moved the SFX/Bank to defines, and allowed the user to customize the hold input.
Works well with the different settings and seems like an awesome mechanic, especially for Kaizo, so it's accepted. Previous rejection was sort of a mistake (spring duplication), since I was unable to replicate it.