I am trying to make a score bored. I am trying to make it go up and down can somebody help?
thanks
Offline
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 endit should work. If it doesn't, please tell me what's wrong (if you can't figure it out yourself)
Last edited by TorbyFork234 (2012-12-15 22:01:48)
Offline
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 endit 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
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 endit 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 forumsthat 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
now how do you get it so it will delete one with the same name?
Offline
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)
Offline
To make a score bored you have to give it nothing to do.
Offline
It would be hard to script one but if ever, use "Variables" that will help you create a scoreboard!
Offline
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!
Offline
Offline
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