Jump to content
Sign in to follow this  
Dorian Gray

append to a formatted hint instead of overlapping it

Recommended Posts

How do I do this

dachint.jpg

like Silola does in DAC? I've been studying his scripts and I suspect it has to do with a sleep and line break but I still can't figure it out.

Share this post


Link to post
Share on other sites

It looks like Silola hasn't been around since October, so I don't think he'll be coming around to help me out with this.

...sorry, didn't mean to double post, meant to edit, wasn't focusing.

Share this post


Link to post
Share on other sites

Okay this deserves a third post as I have figured it out after about 1K trials, studying Silola's code. It's quite embarrassing just how simple this looks, although it is an entirely stripped down version:

_text = "test";
hintSilent parseText _text;
sleep 0.2;
_text = (_text + "<br/>" + "test");
hintSilent parseText _text;

This simply outputs "test" twice with a line break as a single silent hint in the upper right. I would like to figure out how to make it increment automatically; I'm assuming that would be done with a cycle or cycle with step shown here.

Who knows, maybe there's even yet a simpler way to do the above, as I am still a beginner. I am aware of how to do formatting, and I was thinking of making a custom death message script, complete with icons for what weapon a player was killed with. The death messages would not overlap; there would be a "death message history". AFAIK that hasn't been done, but if it has, good. That would take a lot of work ;)

Share this post


Link to post
Share on other sites

Since only one hint can be shown at one time, you need to replace it. So, the code above is the way to go.

Share this post


Link to post
Share on other sites

Well is it possible to do something like list "test" 10 times without pasting the code over and over again?

Share this post


Link to post
Share on other sites

Of course, with a loop. What I meant was that the way to "append" is actually replacing.

Share this post


Link to post
Share on other sites

I don´t see what the first 'hintSilent' is good for...

Why not use something like this?

hintSilent parseText format["<t size='1.15' font='Zeppelin33' color='#81B1E1'>test<br/>%1<br/>%1</t>",_text];

Share this post


Link to post
Share on other sites

That doesn't achieve the desired "typewriter" effect that Silola uses because it doesn't use any sleeps. Also, I am familiar with format usage. I wanted to demonstrate my finding in its most basic form (without any formatting whatsoever).

Share this post


Link to post
Share on other sites

Oh, I see =)

I haven´t tried DAC yet, and I didn´t get the info from your screen shot. I wasn´t so much trying to help but more interested in the point of your request ^^

That "typewriter" effect is indeed a neat idea...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×