Jump to content
IGNORED

call motion ?


1980gamer

Recommended Posts

I am trying to place 24 sprite on the screen.

And in a random sequence, have them start moving.

 

My question is... Can you use a variable to start a sprite moving in a call motion?

 

LET #VAR=3

CALL MOTION(#VAR,20,0)

 

I could swear I have done this in the past? Maybe it was in a Sprite command? Though that will not work for me without a rewrite......

 

Hmmm..?

Link to comment
Share on other sites

Thanks for verifying it should work.

 

The LET #VAR was a typo... But maybe I had the same typo while testing? #VAR would be a local TEMP TABLE in SQL... So it may have looked correct to me?

 

Sample proof of it working...

1 CALL SCREEN(2)
10 CALL CLEAR
20 RANDOMIZE
30 CALL SPRITE(#1,42,12,120,120)
40 CALL SPRITE(#2,42,13,128,128)
50 CALL SPRITE(#3,42,14,112,112)
60 R=INT(RND*3)+1
70 CALL MOTION(#R,10,10)
80 FOR D=1 TO 500 :: NEXT D
90 CALL MOTION(#R,0,0)
100 GOTO 60

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...