Discussions

Petit computer 3 Community

えんぴつけずりき9M47AZ852

10/30/2017 6:51 AM ·Spoilers

Open Closed

範囲内移動

スプライトを画面外に行かせないようにするためにはどうすればいいですか。 ちなみにスライドパットで移動してます。

Advertisement

Comment

This post has no comments.

  • 順に考えてみましょー。 @LOOP  スティックのXYを出力  Xは 現在のX + 出力したスティックXの値×3  Yは 現在のY - 出力したスティックYの値×3  SP0番の位置は X,Y  WAIT 1の様なモノ @LOOPに行け XやYが一定数値より小さい/大きかったら XやYの値を修正するというだけなのでだけなので それを入れる場所は XやYの計算の後 位置設定の前。 IF 判定式 THEN XやYの修正 今回の場合 IF X<0 THEN X=0 等

    Yeahs2
    Played
  • 8行目を X=MIN(MAX(X+SX*3,0),400-32) にすれば良いと思います。 9行目も同様。 余談ですが、右端に行ったら左端から出てくるようにしたい場合 X=(X+400+SX*3) MOD 400 にすれば出来ます。

    Yeahs2
    Played
  • ありがとうございます! おかげで出なくなりました!

    Yeahs1
    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-DPU-2NLB-A66-9G36

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: