21tmccauley wrote:
I tried to make it highlight the text that your cursor is over but it only works for a second after enter is pressed. I know right now the code is very redundant, but I was trying to see that method would even work. (It doesn't)

Code:

1->C
36->B
ClrDraw
For(A,1,36,1
   TextColor(Black
   Text(1,100,"School
   Line(0,238,180,238,Black
   Text(1,170,"Days Left: ",B
   Text(17,1,"Activites:
   Text(32,1,"Play tag (athleticism)" //c=1
   Text(47,1,"Study math (intellegence)" //c=2
   Text(62,1,"Flirt with girls/guys (charisma)" //c=3
   Text(77,1,"Play with some dice (Luck)" //c=4

Repeat K=105
   getKey->K
   max(1,min(4,C+sum(DeltaList(Ans={25,34->C
End
If C=1
Then
   TextColor(Blue
   Text(32,1,"Play tag (athleticism)"
   TextColor(Black
   Text(47,1,"Study math (intellegence)"
   Text(62,1,"Flirt with girls/guys (charisma)"
   Text(77,1,"Play with some dice (Luck)"
   Else
   If C=2
   Then
      TextColor(Blue
      Text(47,1,"Study math (intellegence)"
      TextColor(Black
      Text(62,1,"Flirt with girls/guys (charisma)"
      Text(77,1,"Play with some dice (Luck)"
      Text(32,1,"Play tag (athleticism)"
      Else
      If C=3
      Then
         TextColor(Blue
         Text(62,1,"Flirt with girls/guys (charisma)"
         TextColor(Black
         Text(77,1,"Play with some dice (Luck)"
         Text(32,1,"Play tag (athleticism)
         Text(47,1,"Study math (intellegence)"
         Else
         If C=4
            Then
               TextColor(Blue
               Text(77,1,"Play with some dice (Luck)"
               TextColor(Black
               Text(32,1,"Play tag (athleticism)
               Text(47,1,"Study math (intellegence)"
               Text(62,1,"Flirt with girls/guys (charisma)"
               End
         End
      End
   End
If max(K={1,2,3,4
B-1->B
   If C=1
   //Run tag program
   If C=2
   //Run Math program
   If C=3
   //Run Charisma program
   If C=4
   //Run Dice program

End

I’ll check it out when I get home but it seems to me your problem is the getkey repeat loop put the end for it st the bottom of all the if statements
To clarify what davidclue said, you need to put the End statement of the
Repeat K=105
right before the
If max(K={1,2,3,4

Right now the Repeat loop is only looping the lines
getKey->K
max(1,min(4,C+sum(DeltaList(Ans={25,34->C
Is this what you said to change?

Code:

Repeat K=105
   getKey->K
   max(1,min(4,C+sum(DeltaList(Ans={25,34->C
End
If C=1
Then
   TextColor(Blue
   Text(32,1,"Play tag (athleticism)"
   TextColor(Black
   Text(47,1,"Study math (intellegence)"
   Text(62,1,"Flirt with girls/guys (charisma)"
   Text(77,1,"Play with some dice (Luck)"
   Else
   If C=2
   Then
      TextColor(Blue
      Text(47,1,"Study math (intellegence)"
      TextColor(Black
      Text(62,1,"Flirt with girls/guys (charisma)"
      Text(77,1,"Play with some dice (Luck)"
      Text(32,1,"Play tag (athleticism)"
      Else
      If C=3
      Then
         TextColor(Blue
         Text(62,1,"Flirt with girls/guys (charisma)"
         TextColor(Black
         Text(77,1,"Play with some dice (Luck)"
         Text(32,1,"Play tag (athleticism)
         Text(47,1,"Study math (intellegence)"
         Else
         If C=4
            Then
               TextColor(Blue
               Text(77,1,"Play with some dice (Luck)"
               TextColor(Black
               Text(32,1,"Play tag (athleticism)
               Text(47,1,"Study math (intellegence)"
               Text(62,1,"Flirt with girls/guys (charisma)"
               End
         End
      End
      If max(K={1,2,3,4
   End //Moved this END

I did this, but it just ends the program when you press enter, and it does not highlight the line of text you are on.
You forgot to remove the End statement for the current loop(getkey->K)
I deleted my last post as it was just filler and I didn't want to double post. Right now, I am working on all of the different programs that the menu launches. I decided to put them all in one program. For each of the four categories you can improve in, (intelligence, charisma, athleticism, and luck), this routine happens but different words.

Code:

Then
   Text(1,1,"Gotta go fast!!
   Text(15,1,"Plus 1 athleticism
   L1(4)+1->L1(4)
End
Return
If Z=2
Then
   Text(1,1,"My side hurts :("
   Text(15,1,"Plus 1 athleticism
   L1(4)+1->L1(4)
End
Return
If Z=3
Then
   Text(1,1,"I Don't want to play
   Text(15,1,"Lose 1 athleticism
   L1(4)-1->L1(4)
End
Return
If Z=4
Then
   Text(1,1,"I won!!
   Text(15,1,"Plus 5 athleticism
   L1(4)+5->L1(4)
End
Return

How could I make this more concise? Thanks!
Is ‘Z’ a random number?
davidclue wrote:
Is ‘Z’ a random number?

Yes It is generated every time you choose Something to due in the menu.
You could add some code so the more you choose the athleticism in a row the bigger chance of there being consequences.
davidclue wrote:
You could add some code so the more you choose the athleticism in a row the bigger chance of there being consequences.

I was thinking of adding random events that only activated if you had enough of a certain skill.

Code:

If L1(2)>=12
Then
   randInt(1,5)->Z
   If Z=4
   Then
      Disp "You've won the science","fair.
      Pause " "
      Disp "Gain 5 Intelligence
      Pause " "
      L1(2)+5->L1(2)
   End
End

There will be one of these for each skill that you can improve.

Some other things that I am working on are adding jobs you can get after you finish your 36 rounds of skill. There will a job for each of the categories that require a certain level of a certain skill, and a job that works for anyone. After that, I want to add buying a house which will add boosts to money earned or skills earned. I will also let the user pay to go to college where each turn you can select a skill and improve it by a large amount.

If you have any other ideas of things that I could try to implement, please tell me!
This is looking like its going to be REALLY COOL!!!
That sounds good to keep track of rounds I suggest putting this in the each of the loops after a occurrence

Code:
R+1->R

R is the round so it goes up by 1 every round
  
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 2 of 2
» All times are UTC - 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