I was wondering how if possible to display a random image or an image number from a variable (such as
:randInt (2,5)→A
:BackgroundOn ImageA
)
on the plot. I have tried
:BackgroundOn Image randInt(2,5)
and several things like that, and they all give me errors. I am a noob at this, i am just starting out at programing basic on my Ti84+CE and now I'm experimenting with the plot, and not just the home screen
You need a bunch of If/Else statements, something like this:

Code:
randInt(2,5->A
If A=0:BackgroundOn Image2
If A=1:BackgroundOn Image3
...
PT_ wrote:
You need a bunch of If/Else statements, something like this:

Code:
randInt(2,5->A
If A=0:BackgroundOn Image2
If A=1:BackgroundOn Image3
...


Ohhh that makes sense! Thank you!
The0919 wrote:
PT_ wrote:
You need a bunch of If/Else statements, something like this:

Code:
randInt(2,5->A
If A=0:BackgroundOn Image2
If A=1:BackgroundOn Image3
...


Ohhh that makes sense! Thank you!


Code:
If int(2rand
Then
BackgroundOn Image0
Else
BackgroundOn Image1
End
Save a few bytes while you're at it Wink
CalcMeister wrote:
The0919 wrote:
PT_ wrote:
You need a bunch of If/Else statements, something like this:

Code:
randInt(2,5->A
If A=0:BackgroundOn Image2
If A=1:BackgroundOn Image3
...


Ohhh that makes sense! Thank you!


Code:
If int(2rand
Then
BackgroundOn Image0
Else
BackgroundOn Image1
End
Save a few bytes while you're at it Wink

No I think he wants the previous one (unless he's only using 2 pictures) Wink
The previous code expanded should look like this:

Code:
randInt(2,5->A
If A=2:BackgroundOn Image2
If A=3:BackgroundOn Image3
If A=4:BackgroundOn Image4
If A=5:BackgroundOn Image5
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement