Discussions

SmileBASIC Community

ClaytonDarkClay88

09/17/2016 1:08 AM ·Spoilers

Open Closed

Touching a sprite

How do you make it so when you touch a sprite, it does something.

Advertisement

Comment

This post has no comments.

  • If you don't need to move sprite, remove IF - ENDIF above WEND. I've applied "TOUCH OUT TM,TX,TY" to detect coordinates of stylus. While you don't touch bottom screen, TM will keep zero. And I've applied "SPHITRC(TX,TY,1,1)" to detect collision between stylus and sprite. If SPHITRC detects collision, SPHITRC will return the management number of the sprite.

    Yeahs1
  • Oh okay. I getcha. Thanks!

    Yeahs0
    Played
  • What does the LOCATE do in this whole thing?

    Yeahs0
    Played
  • LOCATE decides the location to print text string on the screen. If you touch sprite, TOUCHING will be printed on the screen, and if you release sprite, TOUCHING will be erased (overwritten by space). You can figure it out soon if you try removing LOCATE.

    Yeahs1
  • Oh oh oh. Locate was for the text whoops my bad.

    Yeahs0
    Played
  • So, I typed it in and tested it, nothing happened. Do you see what I did wrong?

    Yeahs0
    Played
  • You're suppose to tap the button with the Z's.

    Yeahs0
    Played
  • Sprite code.

    Yeahs0
    Played
  • You should do SPCOL to activate collision detection of each sprite.

    Yeahs1
  • Ah okay, that should do it I think.

    Yeahs0
    Played
  • Is there any way to stretch the collision box? Like so if I tap anywhere in the square with the Z's and not just the top left corner, it will do something.

    Yeahs0
    Played
  • Set TRUE as second argument of SPCOL like SPCOL 1,TRUE

    Yeahs1
  • You should write SPCOL 1,TRUE above SPSCALE 1,3,3

    Yeahs1
  • Awesome! It worked! Thank you so much, Hanzo!

    Yeahs0
    Played
  • You're welcome! If you didn't understand anything else, feel free to ask me. I know almost all things except for the things I don't know.

    Yeahs1
  • So you even know how to work with multiplayer or wireless play? :0

    Yeahs0
    Played
  • Oh sorry! I'm bad at them(I have no experience), because I have only one 3DS.

    Yeahs0
  • Ah gotcha, is it actually possible to make it online play?

    Yeahs0
    Played
  • Unfortunately no. SmileBASIC has no measure to connect to the internet excluding downloading cases.

    Yeahs0
  • Interesting, now it kinda makes me think that they're gonna add that feature in a future update. That would be something.

    Yeahs0
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-EJ9-9E2F-RPZ-C6MN

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: