Discussions

SmileBASIC Community

ClaytonDarkClay88

06/25/2016 12:47 AM ·Spoilers

Open Closed

Program Help!

Ok, so I have a shop in my game, and it is in a separate loop instead of it being in the same loop for the gameplay. My question is, how can I buy something in that shop and it applies to the gameplay loop?

Advertisement

Comment

This post has no comments.

  • Easy, just use a global variable. Initialize it once in the beginning.Like MONEY=10:POTIONS=0. In your shop loop just do this IF MONEY>=3 THEN INC POTIONS; MONEY=MONEY-3;WAIT 5 after selecting item.

    Yeahs1
    Played
  • I left out exact syntax, I think you know what I mean though.

    Yeahs0
    Played
  • Like if I was to press A on an thing I want to buy, I would do, IF BUTTON() AND #A THEN ITEM=ITEM+1 ENDIF Then outside the shop loop I do something like, IF ITEM==1 THEN SPSET 0,50,50 ENDIF

    Yeahs0
    Played
  • Oh wait, I got it, thanks for your help! Btw, do you know how to do a vertical scroll effect for a GPUTCHR and making it stop in the middle of the screen?

    Yeahs0
    Played
  • Good, np! Try GPUTCHR PX,PY,“string" then decrement the PY value in a loop to scroll the text up.

    Yeahs1
    Played
  • Here I believe this is what you're looking for.

    Yeahs1
    Played
  • It worked! I changed it by decreasing X instead of increasing Y for a cool effect that you will see soon. ;) One more question please. XD I know how to use Fade like... FADE RGB(0,0,0),100 But how do I fade it back to normal? Like a fade-out.

    Yeahs0
    Played
  • Sorry that I dont know.

    Yeahs0
    Played
  • Its fine. :)

    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-BXN-3HKR-CU8-M9HX

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: