robots not chell

Avatar
gallardo
85 Posts
Posted Jun 21, 2011
Hi,
if it's possible, can I make the player to use the robot in singleplayer instead of the chell model?
Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Jun 21, 2011
Replied 48 minutes later
Maybe if you replace the default 'chell' model with one of the robot models (by copying one of the robot models and pasting it in the correct models folder in your Portal 2 folder) and renaming it to 'chell'.

However if you want this as one off, you could always try using a model precache in order to draw your model. Put the robot of your choice in your map as a prop_dynamic (and compile duh) and when in the console type in 'cl_precacheinfo modelprecache'. This will list all the models currently in the map. The number in front of each model is what you need to take note of (in front of models/player/eggbot/eggbot.mdl OR models/player/ballbot/ballbot.mdl)

When you find out the model number, type in the console: ent_fire !self addoutput "modelindex #NUMBER". Please note that cheats may have to be enabled to do this and you have to put in the quotes.
If you put in a modelindex of a sprite it will crash! So be careful. Also if you want this a test-chamber idea, make sure you do this kind of scripting right before you release your final version as model indexes can change.

I did test this so I know it works :wink:. Comes with the robot sounds and everything.

Avatar
gallardo
85 Posts
Posted Jun 21, 2011
Replied 21 minutes later
First I tried to change cl_playermodel in single, but it doesn't work and resets after restart.

Then I tried creating a coop map, with the start instance and all, and it works.
Nothing new, since it's the way you can already test your coop maps alone (http://developer.valvesoftware.com/wiki ... Maps_Alone).
The problem is that two cheats are required and cheats should not be allowed, so...

Avatar
ChickenMobile
2,460 Posts
Posted Jun 21, 2011
Replied 12 minutes later
Try using a point_clientcommand that enables cheats (for a half a second or so), fire all your commands and then turn cheats off. It's not the first time Valve has done this either.
Avatar
gallardo
85 Posts
Posted Jun 21, 2011
Replied 34 minutes later
Really? For example?
Avatar
The Irate Pirate
236 Posts
Posted Jun 21, 2011
Replied 31 minutes later
Somehow you would also have to make the footstep sounds be that of the robot's (the piston/whirry sounds) if you wanted it to be properly immersive.
Avatar
gallardo
85 Posts
Posted Jun 21, 2011
Replied 1 hour later
Yup, I've discarded the first option in favour of the latter.
It would have been a shame if it didn't work, since it makes more sense playing like a robot instead of chell in custom maps.
Avatar
ChickenMobile
2,460 Posts
Posted Jun 21, 2011
Replied 8 hours later

The Irate Pirate wrote:
Somehow you would also have to make the footstep sounds be that of the robot's (the piston/whirry sounds) if you wanted it to be properly immersive.

I already tested it with the precache model option. It has all the robot animations and sounds. It is pretty awesome.

Would you like a video on how to do it?

Avatar
ChickenMobile
2,460 Posts
Posted Jun 21, 2011
Replied 7 minutes later

gallardo wrote:
Really? For example?

In HL2 they turn cheats on for a few miliseconds during the airboat scene, to execute some player commands.

Avatar
-ArttyIntel-
76 Posts
Posted Jun 21, 2011
Replied 9 minutes later

chickenmobile wrote:
Would you like a video on how to do it?

Very much(:

Avatar
ChickenMobile
2,460 Posts
Posted Jun 21, 2011
Replied 3 minutes later

-ArttyIntel- wrote:
chickenmobile wrote:

Would you like a video on how to do it?

Very much(:

Ok, I'll be making one soon.

EDIT: Might put this off till some1 else asks.

Avatar
gallardo
85 Posts
Posted Jun 22, 2011
Replied 6 hours later
So the first way works too? Any caveat?

I used that tricks already in the past, but always thought wasn't ok for a release. good to be reassured, thanks.

Avatar
walropodes
39 Posts
Posted Jun 22, 2011
Replied 2 hours later
The "setmodel" console command can be used to change the player's playermodel to anything you want. Cheats do not need to be enabled to use it either. You just need to make sure the model has been loaded into your map somewhere first or the game will crash.
Avatar
-ArttyIntel-
76 Posts
Posted Jun 22, 2011
Replied 9 hours later

walropodes wrote:
The "setmodel" console command can be used to change the player's playermodel to anything you want. Cheats do not need to be enabled to use it either. You just need to make sure the model has been loaded into your map somewhere first or the game will crash.

Are you sure? I dont think you could change it to anything. A companion cube for instance.

Avatar
walropodes
39 Posts
Posted Jun 22, 2011
Replied 33 minutes later

-ArttyIntel- wrote:
walropodes wrote:

The "setmodel" console command can be used to change the player's playermodel to anything you want. Cheats do not need to be enabled to use it either. You just need to make sure the model has been loaded into your map somewhere first or the game will crash.

Are you sure? I dont think you could change it to anything. A companion cube for instance.

Yup, you can. Though of course animations are weird.

Avatar
-ArttyIntel-
76 Posts
Posted Jun 22, 2011
Replied 9 minutes later
Really? what code would you input in the console?
Avatar
walropodes
39 Posts
Posted Jun 23, 2011
Replied 8 hours later
If you don't have a cube spawned in your map, you need to do this or Portal 2 will crash:

ent_create_portal_weighted_cube 

Then go:

setmodel props/metal_box

It's important to not have the .mdl at the end of the model name, or the models/ at the beginning, or the game will crash.

Screenshots:
imgimg

Avatar
Hober
1,180 Posts
Posted Jun 23, 2011
Replied 14 minutes later
:potd:
Avatar
walropodes
39 Posts
Posted Jun 23, 2011
Replied 1 hour later
Also if you wanna do the model changing in vscripts you can use GetPlayer().SetModel("models/props/metal_box.mdl");
Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Jun 23, 2011
Replied 1 hour later

walropodes wrote:
-ArttyIntel- wrote:

walropodes wrote:

The "setmodel" console command can be used to change the player's playermodel to anything you want. Cheats do not need to be enabled to use it either. You just need to make sure the model has been loaded into your map somewhere first or the game will crash.

Are you sure? I dont think you could change it to anything. A companion cube for instance.

Yup, you can. Though of course animations are weird.

This is true. I would only change the model to one that has the same animations for a player. If you change it to a portal gun for example, it will only bob around when you walk.