Author Topic: Uh... How do playertypes work again?  (Read 852 times)

Here's the code for the frozen playertype: (Renderman Mod v3)
Code: [Select]
datablock PlayerData(PlayerFrozenArmor : PlayerStandardArmor)
{
   runForce = 0;
   runEnergyDrain = 0;
   minRunEnergy = 0;
   maxForwardSpeed = 0;
   maxBackwardSpeed = 0;
   maxSideSpeed = 0;

   maxForwardCrouchSpeed = 0;
   maxBackwardCrouchSpeed = 0;
   maxSideCrouchSpeed = 0;

   jumpForce = 0; //8.3 * 90;
   jumpEnergyDrain = 0;
   minJumpEnergy = 0;
   jumpDelay = 0;

minJetEnergy = 0;
jetEnergyDrain = 0;
canJet = 0;

uiName = "Frozen Player";
showEnergyBar = false;
};
The purpose of this playertype is to stop the player from moving and freeze them on the spot, while still allowing them to turn. While it does this, it has several annoying bugs.
1) The player slides along the ground if changed to this datablock while moving. ("fixed" by setting velocity to 0)
2) The player is locked in 3rd person.

How do I fix this?

thirdPersonOnly = false; would fix the 3rd person problem. As for the sliding I can only guess.

Try messing with these:
horizResistFactor = 1.0;
runSurfaceAngle = 90;

When in game, open the console and type
inspect(PlayerFrozenArmor);
This will allow you to experiment with the properties of it until you find one that works how you want.

When in game, open the console and type
inspect(PlayerFrozenArmor);
This will allow you to experiment with the properties of it until you find one that works how you want.
Shame you can't modify the values in-game.

Shame you can't modify the values in-game.
You indeed can. Change them, hit apply, away we go. Just do it on a single-player server, where the datablocks ghosted to the client and the real datablocks on the server are the same thing. It won't actually transmit the updated datablock to any remote clients, so they'll get all kinds of weird effects when they look at someone who has been updated while they were connected.

You indeed can. Change them, hit apply, away we go. Just do it on a single-player server, where the datablocks ghosted to the client and the real datablocks on the server are the same thing. It won't actually transmit the updated datablock to any remote clients, so they'll get all kinds of weird effects when they look at someone who has been updated while they were connected.
Sure didn't work for changing the offset of an image.

It won't actually transmit the updated datablock to any remote clients
Is there any _working_ way to do this?

Is there any _working_ way to do this?
It's really not something that should be done at all.

Sure didn't work for changing the offset of an image.
Images are weird in that they resist almost any alteration to the datablock once in-game. It works for players in most cases, though some changes require a respawn or something of similar effect to actually apply.

that player can still shoot

Please rename that playertype. That was ripped straight from the Slayer code and they didn't bother to rename it, so that will mess things up.

Please rename that playertype. That was ripped straight from the Slayer code and they didn't bother to rename it, so that will mess things up.
Oh, ok.

This wasn't actually ripped from slayer btw - I just took the quake player and set everything to 0. I suppose this explains it.

thirdPersonOnly = false; would fix the 3rd person problem. As for the sliding I can only guess.

Try messing with these:
horizResistFactor = 1.0;
runSurfaceAngle = 90;
These are very useful too. Thanks Demian.

Oh ok sounds good.

Demian, what does horizResistFactor do?

Oh ok sounds good.

Demian, what does horizResistFactor do?
It sounds like a very simple way to implement global friction but I have no clue.