HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Multiboard Question

07-13-2006, 05:06 PM#1
doom-HaMsTeR
I'm working on a map thats getting towards finished, but theres one major problem at the moment.

One of the modes of the game is 'Carry the Flag', where you pick up the flag, starting a timer. When the timer expires after 150 seconds, you win. If you lose the flag by dying, your timer pauses and whoever picks up the flag has their timer started.

I started off by putting everyones timer in timer windows, but with 12 players it just overlaps.

Someone suggested using a multiboard, so I put all the triggers in. I used String - Convert Integer to String for the timer part of the multiboard, and every second I update the value for the player with the flag.

This works fine for a while, but then starts going into decimal numbers, which isn't what I want. Sometimes you'll get about 3 decimal places in it, and I just want it to be a whole digit.

The rest of the triggers work, but is there an easier way to do this, or can anyone help so that it won't go into decimals? (Maybe I've missed something really simple :P)

Thanks in advance.
07-13-2006, 05:11 PM#2
shadow1500
I do not know how did you define the time remaining, but I suspect that you are using reals, Convert from real to integer first, then convert the integer to a string, the conversion to integer will remove the decimal.
07-13-2006, 08:50 PM#3
yuripro84
Shouldn't this be in the triggers section? Don't know why you put it here?

This is General Development
07-15-2006, 03:07 PM#4
doom-HaMsTeR
Shadow1500 - I'm using a timer array (one for each player)


Trigger:
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to (String((Integer((Remaining time for CarrytheFlagtimer[1])))))

I've got that. It's converting real to integer to string at the moment, but still getting the decimals. I've just tried it again twice now. It starts off 150.00, then the first time when I picked up the flag (and so starting the timer) it went to 149.42, the second game it went to 149.68.

It could be something to do with updating the multiboard, which I'm doing every 1 second, but I don't really want the decimal points anyway.

Yuripro1984 - I put it in General Development because if I can't do it with multiboard, I wondered whether people had any better ideas as to what I could use instead.
07-15-2006, 03:32 PM#5
Fireeye
Why you use Real > Integer > String?
Conversion - Convert Real to Formatted String is much easier, just change the second number to 0 and that's it.