Modifiable Player Properties

Discussion in 'Mapping Questions & Discussion' started by Macanick, Mar 23, 2017.

  1. Macanick

    Macanick L1: Registered

    Messages:
    44
    Positive Ratings:
    6
    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...
     
  2. henke37

    aa henke37

    Messages:
    1,913
    Positive Ratings:
    447
    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.
     
  3. Diva Dan

    aa Diva Dan hello!

    Messages:
    850
    Positive Ratings:
    1,443
    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.
     
    • Thanks Thanks x 1
  4. Macanick

    Macanick L1: Registered

    Messages:
    44
    Positive Ratings:
    6
    sorry but what's meaning of playing around with flags? is it possible modifing player entities?
     
  5. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    947
    Positive Ratings:
    930
    He means the intelligence I think.
     
    • Agree Agree x 1
  6. Diva Dan

    aa Diva Dan hello!

    Messages:
    850
    Positive Ratings:
    1,443
    Also, what do you need parented to a player? Because there might be a better solution
     
  7. Macanick

    Macanick L1: Registered

    Messages:
    44
    Positive Ratings:
    6
    dynamic prop, like pet plugin
     
  8. Diva Dan

    aa Diva Dan hello!

    Messages:
    850
    Positive Ratings:
    1,443
    Okay, I don't know what to do for that, if you used a flag it would anchor to their back and not actually touch the floor... maybe it would work for air pets like birds?
     
  9. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    947
    Positive Ratings:
    930
    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.
     
    • Thanks Thanks x 1
  10. Macanick

    Macanick L1: Registered

    Messages:
    44
    Positive Ratings:
    6
    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
     
  11. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    947
    Positive Ratings:
    930
    There's a reason why I linked you these 2 threads.