This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-12-15 21:36:16

shiguy101
Scratcher
Registered: 2010-11-17
Posts: 1000+

Making a score bored

I am trying to make a score bored. I am trying to make it go up and down can somebody help?
thanks

Offline

 

#2 2012-12-15 21:51:53

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Making a score bored

set [counter v] to [1]
set [score v] to [whatever score]
set [put? v] to [0]
repeat until <(put?) = [1]>
  if <(score) > (item (counter) of [scoreboard v])>
    insert (score) at (counter) of [scoreboard v]
    set [put? v] to [1]
  else
    change [counter v] by [1]
  end
  if <(counter) > (<length of [scoreboard v]>+(1))>
    insert (score) at (last v) of [scoreboard v]
    set [put? v] to [1]
  end
end
it should work. If it doesn't, please tell me what's wrong (if you can't figure it out yourself)
lol about situation on alpha forums

Last edited by TorbyFork234 (2012-12-15 22:01:48)

Offline

 

#3 2012-12-15 22:05:24

shiguy101
Scratcher
Registered: 2010-11-17
Posts: 1000+

Re: Making a score bored

TorbyFork234 wrote:

set [counter v] to [1]
set [score v] to [whatever score]
set [put? v] to [0]
repeat until <(put?) = [1]>
  if <(score) > (item (counter) of [scoreboard v])>
    insert (join(join (answer)[ : ])[score]) at (counter) of [scoreboard v]
    set [put? v] to [1]
  else
    change [counter v] by [1]
  end
  if <(counter) > (<length of [scoreboard v]>+(1))>
    insert (join(join (answer)[ : ])[score])  at (last v) of [scoreboard v]
    set [put? v] to [1]
  end
end
it should work. If it doesn't, please tell me what's wrong (if you can't figure it out yourself)
lol about situation on alpha forums

that works untill i added a name
EDIT:that is what i did

Last edited by shiguy101 (2012-12-15 22:12:17)

Offline

 

#4 2012-12-15 22:14:57

shiguy101
Scratcher
Registered: 2010-11-17
Posts: 1000+

Re: Making a score bored

shiguy101 wrote:

TorbyFork234 wrote:

set [counter v] to [1]
set [score v] to [whatever score]
set [put? v] to [0]
repeat until <(put?) = [1]>
  if <(score) > (item (counter) of [scoreboard v])>
    insert (join(join (answer)[ : ])[score]) at (counter) of [scoreboard v]
    set [put? v] to [1]
  else
    change [counter v] by [1]
  end
  if <(counter) > (<length of [scoreboard v]>+(1))>
    insert (join(join (answer)[ : ])[score])  at (last v) of [scoreboard v]
    set [put? v] to [1]
  end
end
it should work. If it doesn't, please tell me what's wrong (if you can't figure it out yourself)
lol about situation on alpha forums

that works untill i added a name
EDIT:that is what i did

fixed i just needed to do

 (join(join (score)[ : ])(answer))  
and not
(join(join (answer)[ : ])(score))

Last edited by shiguy101 (2012-12-15 22:18:26)

Offline

 

#5 2012-12-15 22:19:42

shiguy101
Scratcher
Registered: 2010-11-17
Posts: 1000+

Re: Making a score bored

now how do you get it so it will delete one with the same name?

Offline

 

#6 2012-12-16 04:20:01

letmethink
Scratcher
Registered: 2010-05-09
Posts: 100+

Re: Making a score bored

I think it would be

when gf clicked
if <[scoreboard v] contains (name) //do the searching thing above but for the name
end
replace item (put) of [scoreboard v] with (score)

Last edited by letmethink (2012-12-16 04:20:19)


Clicky Clicky!!!               I am writing a book...             Look here

Offline

 

#7 2012-12-16 05:36:10

MasterAnonymous
New Scratcher
Registered: 2012-12-08
Posts: 9

Re: Making a score bored

To make a score bored you have to give it nothing to do.

Offline

 

#8 2012-12-16 05:55:15

TheDBZSonic
Scratcher
Registered: 2012-12-15
Posts: 17

Re: Making a score bored

It would be hard to script one but if ever, use "Variables" that will help you create a scoreboard!


http://i.picasion.com/pic66/5fdb4432543358ea80d2b7fd26c9a528.gif

Offline

 

#9 2012-12-16 05:59:10

TheDBZSonic
Scratcher
Registered: 2012-12-15
Posts: 17

Re: Making a score bored

MasterAnonymous wrote:

To make a score bored you have to give it nothing to do.

Actually you do have to. If you want it to go up by one then Variables are the answer to doing it!
If you ever use Variables, use them for Scores and Misc. stuff!


http://i.picasion.com/pic66/5fdb4432543358ea80d2b7fd26c9a528.gif

Offline

 

#10 2012-12-16 18:56:01

shiguy101
Scratcher
Registered: 2010-11-17
Posts: 1000+

Re: Making a score bored

bump

Offline

 

#11 2012-12-18 04:24:30

MissAdvancedScratch
Scratcher
Registered: 2012-11-16
Posts: 3

Re: Making a score bored

I know a much easier way, but it does involve drawing:
Make 2 sprites each with costumes numbered 0-(whatever maximum score is)
Make a scoreboard.
When something specific happens, you cam make a sprite change costumes to make the numbers go up or down. (p.s: i'm not very good with sratchblocks)

Offline

 

#12 2012-12-18 06:19:18

Tara500
New Scratcher
Registered: 2012-11-08
Posts: 4

Re: Making a score bored

Hello, Everyone

Offline

 

Board footer