PDA

View Full Version : Making working scoreboards in editor?

rlmergeuser
04-29-2012, 07:07 AM
Does anyone know how to make a scoreboard that will display a value in realtime?
Iv seen it in the game but havent seen any info on it.

rlmergeuser
04-29-2012, 08:06 AM
Nothing that is pre made to my knowledge. You would have to make it yourself. You would just keep turning visibility on and off on numbers. I can put up a tutorial in the next few days for you.

rlmergeuser
04-29-2012, 05:11 PM
I figure there night be a value to attach to some kind of device that i made.
There has to be some algorythim that will do it.

rlmergeuser
04-29-2012, 06:48 PM
This is the question I came here to ask. I was just messing around in the editor like usual, and wanted to make something that after doing certain events would unlock a door or whatever. Came up with something simple, being in certain area will add/decrease/multiply/divide to a variable data source, and when that source reaches a certain number the door unlocks.

But it got me thinking, what I made is basically a very simple calculator, and I wanted to be able to display the numbers I was producing. Would be simplish if I was dealing with 0-10 but I'm getting into 4 digits. So I can't set up 10,000 filters and events, so what would I do?

rlmergeuser
04-29-2012, 07:43 PM
[code:3f351svt]Variable = X
(X<0100)=1
(X<0200)=1
(X<0300)=1
(X<0400)=1
(X<0500)=1
(X<0600)=1
(X<0700)=1
(X<0800)=1
(X<0900)=1
(X<1000)=1
However many of these are true are added together and that equals Y
10-Y=Z

if Z=1 :: Visibility to "1a" is turned on
if Z=2 :: Visibility to "2a" is turned on
if Z=3 :: Visibility to "3a" is turned on
if Z=4 :: Visibility to "4a" is turned on
if Z=5 :: Visibility to "5a" is turned on
if Z=6 :: Visibility to "6a" is turned on
if Z=7 :: Visibility to "7a" is turned on
if Z=8 :: Visibility to "8a" is turned on
if Z=9 :: Visibility to "9a" is turned on
if Z=0 :: Visibility to "0a" is turned on

X-(Z*100)=A
(A<010)=1
(A<020)=1
(A<030)=1
(A<040)=1
(A<050)=1
(A<060)=1
(A<070)=1
(A<080)=1
(A<090)=1
(A<100)=1
However many of these are true are added together and that equals B
10-B=C

if C=1 :: Visibility to "1b" is turned on
if C=2 :: Visibility to "2b" is turned on
if C=3 :: Visibility to "3b" is turned on
if C=4 :: Visibility to "4b" is turned on
if C=5 :: Visibility to "5b" is turned on
if C=6 :: Visibility to "6b" is turned on
if C=7 :: Visibility to "7b" is turned on
if C=8 :: Visibility to "8b" is turned on
if C=9 :: Visibility to "9b" is turned on
if C=0 :: Visibility to "0b" is turned on

A-(C*10)=Q
(Q<01)=1
(Q<02)=1
(Q<03)=1
(Q<04)=1
(Q<05)=1
(Q<06)=1
(Q<07)=1
(Q<08)=1
(Q<09)=1
(Q<10)=1
However many of these are true are added together and that equals R
10-R=S

if S=1 :: Visibility to "1c" is turned on
if S=2 :: Visibility to "2c" is turned on
if S=3 :: Visibility to "3c" is turned on
if S=4 :: Visibility to "4c" is turned on
if S=5 :: Visibility to "5c" is turned on
if S=6 :: Visibility to "6c" is turned on
if S=7 :: Visibility to "7c" is turned on
if S=8 :: Visibility to "8c" is turned on
if S=9 :: Visibility to "9c" is turned on
if S=0 :: Visibility to "0c" is turned on[/code:3f351svt]
I must be overthinking this, right?

rlmergeuser
04-30-2012, 09:25 AM
I'll attempt to explain this, as I've successfully made a two-digit scoreboard in the past.
First I made ONE 7-segment display (There aren't any specific 7-segment displays for some reason, so for this example, use the colorable skinny pipes). Set all the pieces of the display to black as default.

Next, we're going to have to create 14 color events; 7 to color it <insert bright color here> and 7 to color it back to black. For organization, I lined up 7 of the events to match the shape of the display, and the other 7 next to it. Hook up the bright color events to each corresponding display piece http://forum.redlynx.com/forum/images/smilies/icon_asleep.gifE. The topmost color event in your group of 7 events will connect to the topmost display piece). Do the same for the black color events.

This will be the confusing part. You will need 10 impulse splitters, which will act as the events that will make the display display the numbers 0-9. Line these up however you want; in a row, or as the same shape you'd find in a number pad.

The impulse splitter will only split up to 8 impulses, but that's okay, since they'll only need 7. The first impulse splitter, representing the number 0, would hook up to the bright color events that would make it look like a 0; the top center, the bottom center, the top left, the bottom left, the top right, and the bottom right. You WILL also need to hook it up to the black color event representing the center part of the display. This is because color events don't turn the piece back to it's original color, so you'd have to override it by turning it black again by something else. Following this pattern, do the rest of the impulse splitters, which will represent 1-9.

Last part. You will now need 10 of the filters that return true if 0 equals 0 or something (forgot the name). Shape these like you shaped the impulse splitters; in a row, or like a number pad. Above it, make a interval trigger. Set it to send impulses every 1 tick, and uncheck reset on checkpoint. For the filter representing 0, set it up so that it compares x (x representing the number it's looking at) to 0 (as in the number it represents). Do the same for the rest of them. (x = 1, x = 2, x = 3, etc)

The way it will work is that the interval trigger, will go through the filter representing 0. If the number it's looking at is 0, it will run the impulse splitter representing 0, but if it isn't 0, it will be false, and redirect the impulse toward the next filter, which represents 1, and it will continue all the way to 9.

Direct the interval to the first filter. Set up the filter so that [On true], it will send the impulse to the first impulse splitter (0), which will run the 6 bright color events, and the 1 black color event, which in turn will display a nice looking 0. Also set it so that [On false], send it to the next filter (1), and do the same thing for that until you get all the way to the 10th flilter.

PS: If the number that the filters are looking at ISN'T A WHOLE NUMBER, all the filters will return false, and nothing will happen. Fix this buy running your number through a 1-value operation, with the setting [Floor], which is pretty much like [Round], but always to the lower number. Then make the filters look at that instead.

PSS: If any developers are reading this, if theres any way to optimize the contraption outlined in this explanation, please PLEASE tell me. I want to make this thing as small as possible.

Sorry if this explanation makes NO sense at all. I'm not a teacher. But on the offhand you do understand this, you're welcome. http://forum.redlynx.com/forum/images/smilies/icon/smile.gif

yeah i'm aware this is only a 1 digit display. if you want me to explain how to split up a two-digit number into two numbers that the displays understand as well, just tell me.