ID:169829
 
Does any one know how to make an Ingame Score Board?

If there is a demo for it can I get the link to it?

or if it is short enough can you just copy and paste me it this topic, Thanks.

if there is no demo for it, or its too long to copy and paste it, just email to [email protected]

(but thats only if you have one)

thanks in advance

Crzylme
Crzylme wrote:
Does any one know how to make an Ingame Score Board?

Yes, and it is actually quite simple. You just need to learn how to use the client's screen list then add objects with number icons to it.

If there is a demo for it can I get the link to it?

There are some text on map demos and libs, yes. Shadowdarke's map-text library is the best I've seen (though I haven't looked into many of them, so that might not be saying a lot).

or if it is short enough can you just copy and paste me it this topic, Thanks.

I don't have anything to copy/paste from at the moment, but I'll type you up a very short example of how you could put numbers on the map.
obj/text
icon='text.dmi'
client/proc/show_number(N)
var/obj/text/text
var/T
for(text in screen)del(text)
if(isnum(N))N=num2text(N)
for(var/index = 1 to length(N))
T=copytext(N,index,index+1)
text=new
text.icon_state=T
text.screen_loc="[6-index],NORTH"
screen+=text

That is assuming you want it anchored to the screen as most people do so that it stays in the same place in their view at all times. If you want it to be actually on the map and not just in the map-view, you need to put the text objects on the turf objects in the map instead.
proc/update_number(N)
var/obj/text/text
var/T
for(text in world)del(text)
if(isnum(N))N=num2text(N)
for(var/index = 1 to length(N))
T=copytext(N,index,index+1)
text=new(locate(world.maxx/2-index,world.maxy-2,1))
text.icon_state=T
In response to Loduwijk
more like a sign a and you click on it and it appears in another screen where you can see it. But thanks for that code, I hope it helps!
In response to Crzylme
Look up Browse(), Stat(), client.screen. They'll all be rather helpful. I think what you're looking for is best done with browse.