Quote:
Originally Posted by nosoop
I see now, you did mention wanting to recreate those two functions in Squirrel. Got lost among the rest of the things that needed clarification given the topic title.
You'll mostly be stuck with whatever Valve provides through VScripts, which in this case, doesn't seem to expose the ability to transmit the TextMsg or HintText user messages to individual players, which those functions need.
The game_text entity would be close (since it looks like you can fire off entity inputs), but is bugged in L4D2.
I don't believe you can register your own VScript / Squirrel functions in the way you describe (making it just work after a one-click install from the Workshop).
|
At the beginning, I wanted to use
HINT to implement it, but HINT has a key problem. It will not conflict with the previously generated HINT.
What are the consequences?
Such as I use HINT to display the HP remain text of special infected they hurt:
like this:
HP ##########------------
I try to use a HINT in front of the player's screen to display the text, or on top of the special infected's head they attack.
I implemented it. It does display a HINT on the player's screen, but if the damage caused many times in a short time, it will cause a very serious problem.
like this:
HP #############------
HP ###########---------
HP ######------------------
HP ###-----------------------
HP #---------------------------
The last HINT hasn't disappeared. the next one will appear.
And the text of HINT in vscript is not like CenterText or HintText in SourcePawn. If the previous text does not disappear, it will directly overwrite the previous text(In sourcepawn).
The vscript's HINT(in essence, it's some tips in the game, like if you shout your teammates, the game will show a instructor: Don't shout your teammate!), If you turn on the game instructor option in the game, you can see many instructors in some scenes at the same time.
So it doesn't work like sourcepawn.
The worst thing is that there is no way to control when to turn it off directly, only to set a specific time to turn it off.
It's right to give up I think.