(10-28-2014, 12:27 PM)FlawlessHappiness Wrote: ^^^What I did. Just use variables...
[...]
By the way, the way I showed numbers is by having an invisible lamp with a billboard tied to it. This way I can just turn it on and off with a nice fade-effect.
Yeah, that sounds like an efficient way of fading it in. If the digits were made as separate lamp entities, you can easily create one using CreateEntityAtArea and SetLampLit. Also, since you're (B) using the 1.3 patch, you can also use the SetEntityPos("digit_2", GetEntityPosX("digit_4") + 1, etc); to place one digit after the previous one. Perhaps a compact assemble of script like so can make it easy to setup any number?
I'm thinking you could create a private void like one of these:
CreateNumber(4200); CreateNumberAtEntity(4200, "name"); CreateNumberAtPos(4200, x, y, z);//the position being the first digit, then the next are created relative to that.
I'm using entites (and particles for transitions). Since the scoreboard is in a fixed position, the script will be relatively simple. I'll be able to show it in a day or 2.
(10-28-2014, 12:08 PM)FlawlessHappiness Wrote: Dude you could've just asked me!
I know dude, thanks!
I already know how to do it with entities. My OP was asking about something different though: basically, "is it possible to display a string variable as HUD text". The answer is no, so I'm doing it Flawlessly.
(10-28-2014, 06:10 PM)MrBehemoth Wrote: I'm using entites (and particles for transitions). Since the scoreboard is in a fixed position, the script will be relatively simple. I'll be able to show it in a day or 2.
(10-28-2014, 12:08 PM)FlawlessHappiness Wrote: Dude you could've just asked me!
I know dude, thanks!
I already know how to do it with entities. My OP was asking about something different though: basically, "is it possible to display a string variable as HUD text". The answer is no, so I'm doing it Flawlessly.
Ok, I said I would come back and show the working scoreboard, so here it is (no sound):
In this example the text down the left is actually static and can't be changed but the numbers on the right are strings defined in script, with an entity representing each digit. The script decides what entity to swap in using ReplaceEntity() for each character in the string.
The same script could be used to display any text, but I only made entities for the numbers (and the "x"), to save time.
If anyone hadn't guessed already, the scoreboard is for Amnesia: The Second Dimension, and a new trailer will be appearing over on that thread in a couple of hours.
Oh man, I hadn't seen that new trailer before now. These mechanics <3 Loving it.
It's all very impressive and will make for a great puzzle game in this engine ^^
ooh yeap I remember now. Great shit.
Those new functions from the patch really open the doors to new original stuff.
I'd love to participate if you need anything, just ask. We all want to see this complete. ;]