Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
programmatic text
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#11
RE: programmatic text

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

(This post was last modified: 10-28-2014, 01:16 PM by Mudbill.)
10-28-2014, 01:15 PM
Find
MrBehemoth Offline
Senior Member

Posts: 408
Threads: 19
Joined: Feb 2014
Reputation: 40
#12
RE: programmatic text

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

10-28-2014, 06:10 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#13
RE: programmatic text

(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 ^_^

Trying is the first step to success.
10-28-2014, 07:08 PM
Find
MrBehemoth Offline
Senior Member

Posts: 408
Threads: 19
Joined: Feb 2014
Reputation: 40
#14
RE: programmatic text

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

(This post was last modified: 11-01-2014, 04:07 PM by MrBehemoth.)
11-01-2014, 03:51 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#15
RE: programmatic text

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

11-01-2014, 04:04 PM
Find
MrBehemoth Offline
Senior Member

Posts: 408
Threads: 19
Joined: Feb 2014
Reputation: 40
#16
RE: programmatic text

Wonder no more.

11-01-2014, 04:23 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#17
RE: programmatic text

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 ^^

(This post was last modified: 11-01-2014, 04:39 PM by Mudbill.)
11-01-2014, 04:38 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#18
RE: programmatic text

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

11-01-2014, 06:53 PM
Find
MrBehemoth Offline
Senior Member

Posts: 408
Threads: 19
Joined: Feb 2014
Reputation: 40
#19
RE: programmatic text

(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

11-01-2014, 08:13 PM
Find




Users browsing this thread: 1 Guest(s)