Frictional Games Forum (read-only)
programmatic text - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: programmatic text (/thread-26953.html)

Pages: 1 2


RE: programmatic text - Mudbill - 10-28-2014

(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:
PHP Code:
CreateNumber(4200);
CreateNumberAtEntity(4200"name");
CreateNumberAtPos(4200xyz);//the position being the first digit, then the next are created relative to that. 



RE: programmatic text - MrBehemoth - 10-28-2014

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! Big Grin

I know dude, thanks! Smile

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. Wink


RE: programmatic text - FlawlessHappiness - 10-28-2014

(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! Big Grin

I know dude, thanks! Smile

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. Wink

Awesome ^_^


RE: programmatic text - MrBehemoth - 11-01-2014

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. Smile


RE: programmatic text - Daemian - 11-01-2014

Looks nice. I wonder what the mod is about. :o


RE: programmatic text - MrBehemoth - 11-01-2014

Wonder no more.


RE: programmatic text - Mudbill - 11-01-2014

Oh man, I hadn't seen that new trailer before now. These mechanics <3 Loving it. [Image: thumbs_up.png]
It's all very impressive and will make for a great puzzle game in this engine ^^


RE: programmatic text - Daemian - 11-01-2014

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. ;]


RE: programmatic text - MrBehemoth - 11-01-2014

(11-01-2014, 06:53 PM)Daemian Wrote: I'd love to participate if you need anything, just ask. We all want to see this complete. ;]

Keep an eye on the main thread in about a month: I'll be looking for serious and thorough beta testers if you're still interested. Big Grin