Change player model

Change player model

Postby Tank420 » Sat Jun 09, 2012 6:26 pm

ok a little help please, i've been looking for a while now for a tutorial or any information about how to change the player model or skin, can anyone point me in the right direction
Image
User avatar
Tank420
Defective Turret
 
Posts: 27
Joined: Jun 1, 2012

Registered users don't see ads! Register now!
 

Re: Change player model

Postby spongylover123 » Sat Jun 09, 2012 6:48 pm

there was a topic about this, search for it.
User avatar
spongylover123
Community Contributor
 
Posts: 942
Joined: Aug 12, 2011

Re: Change player model

Postby FelixGriffin » Sat Jun 09, 2012 7:17 pm

Short answer: the cl_playermodel variable.
Falsi sumus crusto!
FelixGriffin
Olympian and/or War Hero
 
Posts: 2,366
Joined: Jun 13, 2011

Re: Change player model

Postby Another Bad Pun » Sat Jun 09, 2012 7:18 pm

Look in this thread: mapping-help/robots-not-chell-t3709.html?hilit=robots%20not%20chell

This one is on how to make the player model a robot... But you can use this method for many different other models too.
ImageImage
User avatar
Another Bad Pun
Community Contributor
 
Posts: 485
Joined: Feb 26, 2011
Location: Definitely NOT Alaska

Re: Change player model

Postby Tank420 » Sun Jun 10, 2012 1:29 am

spongylover123 wrote:
there was a topic about this, search for it.


Tank420 wrote:
i've been looking for a while now ... can anyone point me in the right direction


Sorry, not clear enough for you. posts like this annoy me, i had been looking, i failed to find something, so i asked the community for help, you had the time to respond, so why not go that little bit further and try to help, your response was not constructive, and was a waste of your time.

thanks for both the short answer, i shall give it a go figuring cl_playermodel out myself, i learn better that way, and if i get stuck i'll refer to the tutorial

Thanks again

Tank

EDIT
So i've tried getting to grips with cl_playermodel and gotten no where, so i put a point_clientcommand in with 'setmodel player/chell/player' as the parameters, but i assume there is a better way than this.

what is cl_playermodel
an entity? a map property, confused.

ADDITIONAL EDIT
I see cl_playermodel is in a local config file.

What i mean to ask is, how do you set the player model in hammer, so the level starts with a different character
Image
User avatar
Tank420
Defective Turret
 
Posts: 27
Joined: Jun 1, 2012

Re: Change player model

Postby Lpfreaky90 » Sun Jun 10, 2012 4:36 am

As far as I know the point_clientcommand setmodel is the only way, so if you want a different model you should use that.
User avatar
Lpfreaky90
Senior Stalemate Associate
 
Posts: 2,871
Joined: May 3, 2011
Location: In a pet zoo nearby.

Re: Change player model

Postby Tank420 » Sun Jun 10, 2012 7:44 am

do we know how the game picks, is it by game type? i.e. if you're playing single you're chell, if you're co op then pbody or atlas, and if workshop bendy?
Image
User avatar
Tank420
Defective Turret
 
Posts: 27
Joined: Jun 1, 2012

Re: Change player model

Postby BenVlodgi » Tue Jun 12, 2012 12:20 am

Tank420 wrote:
do we know how the game picks, is it by game type? i.e. if you're playing single you're chell, if you're co op then pbody or atlas, and if workshop bendy?

yup

here is a conversation from the secret steam forums... which you probably don't have access to
spongylover123 wrote:
in hammer, you need to make the output.
OnMapSpawn - @command - Command - setmodel player/chell/player
BenVlodgi wrote:
This is fantastic news! thanks!
EDIT:
However, this does cause the portal-gun to be held at a bad angle
CaretCaret wrote:
Yeah, looks like it wasn't the best solution. For me the portal gun is held at a weird angle, there's no walking animation and it resets to bendy when a save is loaded.
Motanium wrote:
Try using onmapload instead of onmapspawn
spongylover123 wrote:
you have to prechache the model. That's how I got atlas to walk. the portalgun is an issue though.
ImageImageImage

Also, I made a map just for you! Sunset
Click Here to view my Workshop and play my puzzlemaker maps
User avatar
BenVlodgi
Senior Stalemate Associate
 
Posts: 592
Joined: Jul 1, 2011
Location: Michigan USA

Re: Change player model

Postby FelixGriffin » Tue Jun 12, 2012 10:50 am

I might make an instance for this once it works.

It seems like what you'll need is the logic_auto and point_clientcommand, plus a prop_dynamic (will a static one work? IDK) of Chell to precache te model. You could put it in a nodraw-box so that it's not in your test chamber itself.
Falsi sumus crusto!
FelixGriffin
Olympian and/or War Hero
 
Posts: 2,366
Joined: Jun 13, 2011

Re: Change player model

Postby ChickenMobile » Tue Jun 12, 2012 9:14 pm

FelixGriffin wrote:
It seems like what you'll need is the logic_auto and point_clientcommand, plus a prop_dynamic (will a static one work? IDK) of Chell to precache te model. You could put it in a nodraw-box so that it's not in your test chamber itself.
Exactly right. In order to change the playermodel you need to precache it (as well as the animations with it. This is automatically done when you place in a dynamic model).

Changing the playermodel is easy in singleplayer: by just using the cl_playermodel command. However if you want to change the player model in coop; that may take a bit more work such as grabbing a modelindex and setting the player's modelindex to it.
                             Image
User avatar
ChickenMobile
Senior Stalemate Associate
 
Posts: 2,391
Joined: May 9, 2011
Location: Canberra, Australia

Re: Change player model

Postby Tank420 » Wed Jun 13, 2012 2:40 am

ok so i'm trying this right now, and i don't see an issue with the angle of the portal gun.

if there is tho, would this not fix it
viewmodel_offset_y 0.0
viewmodel_offset_z 0.0
viewmodel_offset_x 0.0

EDIT
Ok so i think i see what the problem is, the portal gun is being held not at the wrong angle, but the wrong height, i.e. it starts at chell's height and doesn't change for ballbot, eggbot holds it about the same height anyway. Can't find bendy to prechace(although i guess you wouldn't need to prechache him on the community maps, cos he's the default) or set model as, but didn't really want him anyway, but i assume when the map is uploaded, the gun would start at bendy's height, and would only really match ballbot's height. I guess.

also
Tank420 wrote:
viewmodel_offset_y 0.0
viewmodel_offset_z 0.0
viewmodel_offset_x 0.0

doesn't help
Image
User avatar
Tank420
Defective Turret
 
Posts: 27
Joined: Jun 1, 2012

Re: Change player model

Postby josepezdj » Wed Jun 13, 2012 4:00 am

@Tank420: After reading this thread I'm not really sure if you already managed to change the player model or not, as all replies urged you to visit other threads, would you please confirm? I think this is not difficult to achieve...
ImageImageImageImageImageImageImageImage
User avatar
josepezdj
Olympian and/or War Hero
 
Posts: 2,121
Joined: May 8, 2011
Location: Spain

Re: Change player model

Postby Tank420 » Wed Jun 13, 2012 5:04 am

josepezdj wrote:
@Tank420: After reading this thread I'm not really sure if you already managed to change the player model or not, as all replies urged you to visit other threads, would you please confirm? I think this is not difficult to achieve...


You might wanna re-read the posts, only 2 people have pointed me else where, and the linked page was useful, but essentially it's not that difficult, you need to put a logic_auto, point_clientcommand, and a model of which ever player you want to use, all in a hidden room. make the logic_auto -> onmapspawn -> @command -> command -> setmodel <char here>

i am in the the process of making a character selection screen, and i have run into a problem changing from chell to eggbot, (holds the portal gun near his head)the problem doesn't arise when you change from chell to ballbot or ballbot to eggbot or any other combinations, just chell to eggbot, so i've made eggbot's change, include a 0.1 second change to ballbot before changing to eggbot.

Below should be a link to the work i've done so far, in this file there are 3 rooms, 1 is the global pti instance, 2 is the room i have described above, 3 is the room with the character selection. if you just want to have it change to a different character, room 2 is all you need, and you should change the logic auto depending on what you want

setmodel player/ballbot/ballbot
setmodel player/chell/player

setmodel player/eggbot/eggbot
(for this i suggest a 0.1 sec change to eggbot first to avoid strange positioning of portal gun)

http://forums.thinkingwithportals.com/downloads.php?view=detail&df_id=2096
Image
User avatar
Tank420
Defective Turret
 
Posts: 27
Joined: Jun 1, 2012

Re: Change player model

Postby josepezdj » Wed Jun 13, 2012 5:18 am

Tank420 wrote:
You might wanna re-read the posts, only 2 people have pointed me else where, and the linked page was useful, but essentially it's not that difficult, you need to put a logic_auto, point_clientcommand, and a model of which ever player you want to use, all in a hidden room. make the logic_auto -> onmapspawn -> @command -> command -> setmodel <char here>
Exactly. That would be the scenario.

About the position of the portalgun, you have to use scripting and set its angles (could it be something like:

w_portalgun.SetAngles(ang.x,y,z);
)
ImageImageImageImageImageImageImageImage
User avatar
josepezdj
Olympian and/or War Hero
 
Posts: 2,121
Joined: May 8, 2011
Location: Spain

Re: Change player model

Postby Tank420 » Wed Jun 13, 2012 5:25 am

josepezdj wrote:
About the position of the portalgun, you have to use scripting and set its angles (could it be something like:

w_portalgun.SetAngles(ang.x,y,z);
)


Tbh the actual angle of the gun is fine, it's the height, and it's only really an issue when you can see the player model, you know how when you look through a portal and you can see yourself, your crosshairs normally are the same height as your gun, well depending on who you started out as, the crosshairs remain at the same height, while the position of the gun actually moves as it should. except with the slight glitch i mentioned when changing from chell to eggbot.

and i haven't got as far as learning how to implement scripting yet

Strange Eggbot Gun Position after changing from chell to eggbot

Image

Height Differences(i don't really see this being an issue, i've made it switch to third person for 3 seconds then back to first person.

Image
Image
Image
Last edited by Tank420 on Wed Jun 13, 2012 5:58 am, edited 3 times in total.
Image
User avatar
Tank420
Defective Turret
 
Posts: 27
Joined: Jun 1, 2012

Registered users don't see ads! Register now!
 
Next

Return to Hammer and Modding



Who is online

Users browsing this forum: No registered users and 7 guests