Author Topic: Function for Walking  (Read 3338 times)

Playtypes change the sizes of players, and they also change the values of the players, including the speed the player walks, jumps, and healh too. I was wondering if it was possible to do the same thing to a player but not alter all the values.

I was also wondering if you could force a player to use the command "walking" through a script, and lock them into using it and can not stop until otherwise. I do know you can force the player to zoom in.


Forget it. Found out that this isn't possible anyways.  However, I want to know what the function is for moving forward, backwards, anything of the sort
« Last Edit: January 24, 2012, 08:47:19 PM by Minnax »

I think you mean player datablocks but I'm not sure.
If you want to edit just a few values, you can do something like this:
Code: [Select]
datablock PlayerData(MyPlayer:PlayerStandardArmor)
{
    canJet = 0;
    runForce=30000;
};
That would copy all of the attributes from the default player besides the ones you specify.

You can't really force a player to walk through a script, however you could push them towards where they're looking to simulate walking. I don't recommend it.

The only way to simulate proper engine-handled walking velocity would be making them an identical AIPlayer, removing their player and use .setMoveDestination/.setMoveObject/.setMoveSpeed on the AIPlayer. Also, remember to set their control object to their camera and make their camera orbit the AIPlayer.

I don't recommend it, though.

Prehaps I said forcing a player to walk wrong. By using command, I mean, as if you were holding it on. As if you were forced to slow down when moving, via, walking command.

And I do not mean player datablocks. I asking for how does playerscale work when you use it, does it reduce datablock values?

Prehaps I said forcing a player to walk wrong. By using command, I mean, as if you were holding it on. As if you were forced to slow down when moving, via, walking command.

And I do not mean player datablocks. I asking for how does playerscale work when you use it, does it reduce datablock values?
I'm sorry sir, but the first part of your message makes 0 sense.

As for the second part, it makes slightly more sense but not completely. If by playerscale you mean the size of the player, all the values remain the same except for things that operate on a multiplier of player size, such as damage taken. It doesn't reduce or increase other datablock values, such as max speed.

I'm sorry sir, but the first part of your message makes 0 sense.

As for the second part, it makes slightly more sense but not completely. If by playerscale you mean the size of the player, all the values remain the same except for things that operate on a multiplier of player size, such as damage taken. It doesn't reduce or increase other datablock values, such as max speed.

Do you know what alters thier's speed in that case? Where should I look?

And let me rephrase the first part again. A statement makes forces your player to walk, like the walk command. Similar to this nifty code that forces your player to zoom in.
Code: [Select]
%client.setControlCameraFov(45);

And let me rephrase the first part again. A statement makes forces your player to walk, like the walk command. Similar to this nifty code that forces your player to zoom in.
Code: [Select]
%client.setControlCameraFov(45);
That's what we were talking about before. It's impossible. You either have to impulse the person in the direction they're looking, or do what Port said and make an AI player.

Do you know what alters thier's speed in that case? Where should I look?
Speed doesn't change based on size. The only way to alter speed is to increase the maxForwardVel (I'm 90% sure this is it) variable on the actual datablock, using the method I showed above.

Yeah, but as said before, the player scale does not alter the datablock's values, just alters it. I want to know how can I find out what is used to do so?

Yeah, but as said before, the player scale does not alter the datablock's values, just alters it. I want to know how can I find out what is used to do so?
so it does not alter it, it alters it. makes 100% sense.

Yeah, but as said before, the player scale does not change the datablock's values, just alters it through function and statments. I want to know how can I find out what is used to do so?

What you are talking about is a part of the engine. You can in no way simulate this through TorqueScript while having an outcome equally as good as the standard system (see: glitchy).


Alter means change. Changing the world alter to change does not improve the coherency of your statement. You're saying something isn't changed, it's changed by x. I can not help you unless you say it in a way that makes sense.

Forget it. Found out that this isn't possible anyways.  However, I want to know what the function is for moving forward, backwards, anything of the sort

God damn guys.

He means when you push and hold the C key.
He wants the function for that.

he could try trace...

However, I want to know what the function is for moving forward, backwards, anything of the sort

$mvBackwardAction
$mvForwardAction
$mvLeftAction
$mvRightAction
$mvUpAction
$mvDownAction