Modifiable Player Properties

Macanick

L1: Registered
Dec 12, 2016
45
8
There's not much information about player properties in developer community (or maybe i can't found them) like custom model, SetHealth, etc...
some input didn't work (ex. SetHealth) and some other things not much information about them (removing weapon, player body size i don't know how to do that).
It'll be much better if there's tutorial about player properties, i just want to know how much player can be modified by map.
What i need right now is weapon remove, body size configure, parenting player/parent other entity to player, custom model but also other information will be useful for making maps.

thanks for reading :) i hope this question not being idiotic...
 

henke37

aa
Sep 23, 2011
2,075
515
The issue is that the player entity class is shared between all the source games. But it's never the same version of the class. And the wiki does a rather poor job at making the version differences clear.
 

Diva Dan

hello!
aa
Mar 20, 2016
1,025
1,953
You can change the player size through an entity that isn't in the FGD. Trigger_add_or_remove_tf_player_attributes. The field for changing height it "torso scale". If you want the entire player to be either really small or really big (this changes their hit box), use trigger_add_tf_player_conditon. In the field, use either TF_COND_HALLOWEEN_GIANT or TF_COND_HALLOWEEN_TINY. Both force you into third person, so also add a trigger_multiple brush to tell a point_cloentcommand entity to have the user enter the command "firstperson".

To put something on a player, try playing around with flags. Whatever you parent to it, it will follow.

I'm not sure how to remove player weapons, I know you can disable them. Try asking Corvatile since he used it in a map.
 

Macanick

L1: Registered
Dec 12, 2016
45
8
You can change the player size through an entity that isn't in the FGD. Trigger_add_or_remove_tf_player_attributes. The field for changing height it "torso scale". If you want the entire player to be either really small or really big (this changes their hit box), use trigger_add_tf_player_conditon. In the field, use either TF_COND_HALLOWEEN_GIANT or TF_COND_HALLOWEEN_TINY. Both force you into third person, so also add a trigger_multiple brush to tell a point_cloentcommand entity to have the user enter the command "firstperson".

To put something on a player, try playing around with flags. Whatever you parent to it, it will follow.

I'm not sure how to remove player weapons, I know you can disable them. Try asking Corvatile since he used it in a map.
sorry but what's meaning of playing around with flags? is it possible modifing player entities?
 

Tumby

aa
May 12, 2013
1,085
1,193
You should read some of the "how it's done" threads by A Boojum Snark.

https://tf2maps.net/threads/the-entity-guru-the-car-the-chairman-the-derby.13412/
What you will learn:
Making a thing move forward forever while being able to rotate it in any direction.
Something about sound effects and their pitch.

https://tf2maps.net/threads/egg-war-mechanical-logic-and-other-complexities.22398/
What you will learn:
Keeping track of every player on the server.
Making individual people very small and making them normal sized after a set time.

pet plugin
If you want something to follow the player, you can at the very most parent it to one of bones meant for cosmetics. For example where the Boo Balloon is placed. You will need to find out the name of the bone first. Use "SetParent" followed by "SetParentAttachment" to parent to a given bone.
You will not be able to make a little robot or whatever that moves about on his own and follows a given player. This is not how parenting works. You would need an NPC but that ain't possible.
 

Macanick

L1: Registered
Dec 12, 2016
45
8
You should read some of the "how it's done" threads by A Boojum Snark.

https://tf2maps.net/threads/the-entity-guru-the-car-the-chairman-the-derby.13412/
What you will learn:
Making a thing move forward forever while being able to rotate it in any direction.
Something about sound effects and their pitch.

https://tf2maps.net/threads/egg-war-mechanical-logic-and-other-complexities.22398/
What you will learn:
Keeping track of every player on the server.
Making individual people very small and making them normal sized after a set time.


If you want something to follow the player, you can at the very most parent it to one of bones meant for cosmetics. For example where the Boo Balloon is placed. You will need to find out the name of the bone first. Use "SetParent" followed by "SetParentAttachment" to parent to a given bone.
You will not be able to make a little robot or whatever that moves about on his own and follows a given player. This is not how parenting works. You would need an NPC but that ain't possible.
The pet plugin i know is just some model floating around players like cosmetic you said
can you give me a more detailed explanation about that bone parenting? i really don't know how player entity works