Author Topic: No crouch playertype.  (Read 6935 times)

I am pretty sure

Again, nope. Read this thread over and over and stop pulling these crazy ideas about how the game networking works out of your ass. People quickly lose patience with the ignorant.

I think what he's failing to understand is that the game engine is powered by C++, and that C++ code is only available via TorqueScript if it has been wrapped into TorqueScript via the engine.

I think what he's failing to understand is that the game engine is powered by C++, and that C++ code is only available via TorqueScript if it has been wrapped into TorqueScript via the engine.

He sometimes doesn't understand what client sided means as well.

He sometimes doesn't understand what client sided means as well.

If you are referring to me, then that is completely untrue.  You probably didn't even look back through any posts before claiming that.

Again, nope. Read this thread over and over and stop pulling these crazy ideas about how the game networking works out of your ass. People quickly lose patience with the ignorant.

My experience with commands going between the client and the server have all included easily packagable serverCmd's and clientCmd's, and I naturally assumed all communication between the client and the server worked in such a way, with the exception of authencation, which includes the master server.  Sorry if that is not how it works.  I guess I will stick with simpler, non-engine related stuff.

so I finally went and tested this..

first - build something that you have to crouch to get under.
crouch and go under -- make sure it works
try to go under w/o crouching -- make sure it DOESNT work

then goto the console and enter:
playerstandardarmor.crouchBou ndingBox="5 5 10.6";

now crouch and try to go under your bricks.
It wont work.


So to "fix" this, go into your mod, and inside the command that starts things off add this:
playerstandardarmor.crouchBou ndingBox="5 5 10.6";

Now it will LOOK like the player crouches.. but, it will have no effect.. they will still get hit by stuff, and they wont be able to crawl under things.

You're about 3 days late to that answer.

You're about 3 days late to that answer.
sorry - I tend to lose track of useful posts with all the trolling and arguments.

Now it will LOOK like the player crouches.. but, it will have no effect.. they will still get hit by stuff, and they wont be able to crawl under things.

I'm fine with this because the build I am making was made specifically for a top down playertype that doesn't jump or crouch.

I'd be nice if there was a playertype, that when crouch, it sits instead.

I am pretty sure that when the client side function crouch(); is called, it sends some sort of command to the server.  As far as I know, any case where there is a client sided command to the server, there is a function on the server that recieves that command and handles the player crouching.
If this isn't the case, then there is some other way for the client to communicate to the server which I have never heard of.

And I don't know alot about animations, but I know they have to do with what the player does when certain actions are done, and it might be by blocking animations that crouching can be prevented.
I'm not sure what you mean by being able to be hit with a bullet, I don't think I said that...?

Here's the code for crouching on the client side.

function crouch(%val)
{
   if(%val != $crouching && %val !$= "")
   {
      $mvTriggerCount3++;
      $crouching = !$crouching;
   }
}

Figure out how to stop that on the server side.

Edit: Bolded part is the part that actually makes the player crouch.
« Last Edit: May 21, 2011, 09:35:43 PM by Chrono »

Bump for a new issue.

Is there anyway I can have the camera angle fixed so it doesn't rotate but you can still rotate your avatar?

I have an idea for how to do it, if I have time I'll write the code later:

- set camera mode to static, facing the proper direction
- set client's control object to the client's player
- when player moves, set camera transform to player's position

Obviously this would be a little hacky, but I think it should work.