Raised This Month: $51 Target: $400
 12% 

Looks like Valve added a truly dynamic text entity in the new CS:GO update


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kinsi
Senior Member
Join Date: Apr 2013
Old 05-24-2017 , 13:13   Looks like Valve added a truly dynamic text entity in the new CS:GO update
Reply With Quote #1

Its called point_worldtext.

How it looks ingame:


Netprops:

Last edited by Kinsi; 05-24-2017 at 13:13.
Kinsi is offline
Kinsi
Senior Member
Join Date: Apr 2013
Old 05-24-2017 , 13:15   Re: Looks like Valve added a truly dynamic text entity in the new CS:GO update
Reply With Quote #2

Props to Zipcore for spotting the new entity
Kinsi is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 05-24-2017 , 13:34   Re: Looks like Valve added a truly dynamic text entity in the new CS:GO update
Reply With Quote #3

cool
8guawong is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 05-24-2017 , 14:09   Re: Looks like Valve added a truly dynamic text entity in the new CS:GO update
Reply With Quote #4

sry Boomix
__________________
zipcore is offline
Kinsi
Senior Member
Join Date: Apr 2013
Old 05-24-2017 , 14:44   Re: Looks like Valve added a truly dynamic text entity in the new CS:GO update
Reply With Quote #5

Some quick and dirty stock for it, as i find it useful to debug stuff.

PHP Code:
stock int SpawnFormattedWorldText(const char format[128], const int textSize 10, const float origin[3], any ...) {
    
int ent CreateEntityByName("point_worldtext");
    if(
IsValidEdict(ent)) {
        
char myFormattedString[512];
        
VFormat(myFormattedStringsizeof(myFormattedString), format4);
        
        
DispatchKeyValue(ent"message"myFormattedString);
        
IntToString(textSizemyFormattedStringsizeof(myFormattedString));
        
DispatchKeyValue(ent"textsize"myFormattedString);
        
DispatchSpawn(ent);
        
TeleportEntity(entoriginNULL_VECTORNULL_VECTOR);
    }
    return 
ent;
}

stock int SpawnWorldText(const char text[512], const int textSize 10, const float origin[3]) {
    return 
SpawnFormattedWorldText("%s"textSizeorigintext);


Last edited by Kinsi; 05-24-2017 at 14:46.
Kinsi is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 05-24-2017 , 14:54   Re: Looks like Valve added a truly dynamic text entity in the new CS:GO update
Reply With Quote #6

Isn't this just a glorified version of the old point_message entity?

Last edited by Mitchell; 05-24-2017 at 15:31.
Mitchell is offline
Kinsi
Senior Member
Join Date: Apr 2013
Old 05-24-2017 , 15:09   Re: Looks like Valve added a truly dynamic text entity in the new CS:GO update
Reply With Quote #7

game_text displays text on the screen, kind of like HudMsg does. This one has the text actually displayed at the origin of the entity with a fixed rotation, size, color, etc as well as allowing for parenting.

Last edited by Kinsi; 05-24-2017 at 15:09.
Kinsi is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 05-24-2017 , 15:17   Re: Looks like Valve added a truly dynamic text entity in the new CS:GO update
Reply With Quote #8

This one has color and rotation support. Keep in mind the text is NOT centered. The First char starts where you teleport it!

PHP Code:
stock int Point_WorldText(float fPos[3], float fAngles[3], char[] sText "Source 2 Engine?"iSize 10,  int r 255int g 255int b 255any ...)
{
    
int iEntity CreateEntityByName("point_worldtext");
    
    if(
iEntity == -1)
        return 
iEntity;
    
    
char sBuffer[512];
    
VFormat(sBuffersizeof(sBuffer), sText8);
    
DispatchKeyValue(iEntity,     "message"sBuffer);
    
    
char sSize[4];
    
IntToString(iSizesSizesizeof(sSize));
    
DispatchKeyValue(iEntity,     "textsize"sSize);
    
    
char sColor[11];
    
Format(sColorsizeof(sColor), "%d %d %d"rgb);
    
DispatchKeyValue(iEntity,     "color"sColor);
    
    
TeleportEntity(iEntityfPosfAnglesNULL_VECTOR);
    
    return 
iEntity;

__________________

Last edited by zipcore; 04-08-2020 at 10:47.
zipcore is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 05-24-2017 , 15:30   Re: Looks like Valve added a truly dynamic text entity in the new CS:GO update
Reply With Quote #9

Sorry, meant point_message that was used in hl2 dev mode: https://developer.valvesoftware.com/wiki/Point_message
Also csgo will probably never be created on Source2, however they can still move stuff from source2 to csgo's engine, it will truly never be Source2

Last edited by Mitchell; 05-24-2017 at 15:32.
Mitchell is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 05-24-2017 , 15:33   Re: Looks like Valve added a truly dynamic text entity in the new CS:GO update
Reply With Quote #10

You are right but point_message has no size & color support
__________________
zipcore is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:47.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode