Page 1 of 1

game_text

PostPosted: Wed Jan 15, 2014 5:50 pm
by TechieUK
I'm trying to make an entity based off of game_text by basically duplicating the file(s) under a different name. Where exactly is game_text located in the source? Does it even have it's own file? I've searched the entire solution for game_text and only found 2 results.

Re: game_text

PostPosted: Wed Jan 15, 2014 6:32 pm
by LordDz
"In code it is represented by class CGameText, defined in maprules.cpp. "
https://developer.valvesoftware.com/wiki/Game_text
=) =)

Re: game_text

PostPosted: Wed Jan 15, 2014 8:24 pm
by TechieUK
Ah, I missed that part :)

Re: game_text

PostPosted: Thu Jan 16, 2014 3:02 pm
by TechieUK
Alright env_game_hint is now an existing entity and it works great! Thanks.

Re: game_text

PostPosted: Thu Jan 16, 2014 3:15 pm
by LordDz
Will I get a cookie now? :)

Re: game_text

PostPosted: Thu Jan 16, 2014 6:12 pm
by TechieUK
Image

Or alternatively you can get millions of them here.

Re: game_text

PostPosted: Sat Jan 18, 2014 7:43 pm
by TechieUK
I have another question, how can I modify this to allow the picking up of ragdolls? I spent a few hours fiddling about with it, but I'm not sure where to allow the picking up of ragdolls.

Code: Select all
void CHL2_Player::PickupObject( CBaseEntity *pObject , bool bLimitMassAndSize )
{
   // can't pick up what you're standing on
   if ( GetGroundEntity() == pObject )
      return;
   
   if ( bLimitMassAndSize == true )
   {
      if ( CBasePlayer::CanPickupObject( pObject, 35, 128 ) == false )
          return;
   }

   // Can't be picked up if NPCs are on me
   if ( pObject->HasNPCsOnIt() )
      return;

   PlayerPickupObject( this, pObject );
}

Re: game_text

PostPosted: Sun Jan 19, 2014 5:45 pm
by LordDz
Are ragdolls treated as objects? As there is a difference between those and prop_physics..

Re: game_text

PostPosted: Sun Jan 19, 2014 8:28 pm
by TechieUK
I've got ai_force_serverside_ragdoll set to 1 by default so all my ragdolls are serverside, and you can't pick them up, so I'm gonna say no. They should be prop_ragdoll, I think.

Re: game_text

PostPosted: Mon Jan 20, 2014 2:57 am
by Gary
It shouldn't be hard. Look at how the super gravity gun does it.

Re: game_text

PostPosted: Mon Jan 20, 2014 3:20 pm
by TechieUK
Not a bad idea actually, I should probably search through the HL2 code more thoroughly before I ask.