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

#1 2011-11-12 12:16:56

kaeila
New Scratcher
Registered: 2011-11-12
Posts: 1

Hi everyone!

I am new to scratch and I am wanting to know how to show rankings.

I will explain more, I am making a project that it is like the league standing you find in a newspaper about football. So I have 4 teams (4 separate sprites) and one statistician. I am wanting to know if I click one of the sprites representing each of the teams how would I write a script so that it would show in a speech bubble what rank they are (1st 2nd 3rd or 4th).

I have tables (lists) representing how many wins each spite has how losses, points scored against each points score for each and the standings.

I really hope this made sense and I would really appreciate any help I can get

Thanks a bunch!

Offline

 

#2 2011-11-12 13:39:12

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Hi everyone!

There's probably a simpler way, but the way I would do it is make a list with the team in 1st place at item 1 of the list, 2nd place item 2, and so on. Then put:

When team 1 clicked
If item 1 of list = me
Say 1st!
End if
If item 2 of list = me
Say 2nd!
End if
If item 3 of list = me
Say 3rd!
End if
If item 4 of list = me
Say 4th!
End if

I haven't tested it, but I think this would work.  smile


Why

Offline

 

#3 2011-11-12 19:49:04

anuw
Scratcher
Registered: 2009-04-09
Posts: 50

Re: Hi everyone!

<when green flag clicked><forever><if><<touching[ mouse pointer]? <and> <mouse down?>><say[ 1st rank ]for(  3)secs><else><if> ... So on  smile  Hope this helps  big_smile


http://lolwut.com/layout/lolwut.jpg Lolwut?

Offline

 

Board footer