Author Topic: Constant Variables  (Read 1126 times)

I want to be able to set a constant value for the player's velocity, without having a really short loop to set it over and over. Is this in anyway possible?

No. But there may be another way to solve this problem. What are you actually trying to achieve with it?

I want the player to be able to move in a straight line by the direction their facing until stopped.
« Last Edit: December 31, 2015, 11:05:26 PM by Czar »

Players are able to control themselves completely and the class does not have any override functions unlike AIPlayer, from what I remember you'll need an AIPlayer to do this and set the player's orbit to the AIPlayer. Don't give the client (player) any control because then it ruins the point of this.

I want the player to be able to move in a straight line by the direction their facing until stopped.

Do you mean no gravity?

I want the player to be able to move in a straight line by the direction their facing until stopped.
You mean like walking forwards without having the player press a button?
You could use:
Code: [Select]
CommandToClient(%client,'moveForward', true);But they will still be able to switch it off.
Good for some kind of auto-travel system.
Bad if you want to force them to walk.


Why not set the player velocity?

Why not set the player velocity?

It'll looks like crap on the client, similar to the old hookshot.

You could use:
Code: [Select]
CommandToClient(%client,'moveForward', true);
Does that even exist

yes
Code: [Select]
%pz = new PhysicalZone()
{
position = findclientbyname("czar").player.getPosition();
velocityMod = "0";
gravityMod = "0";
extraDrag = "0";
isWater = "0";
waterViscosity = "40";
waterDensity = "1";
waterColor = "0.200000 0.600000 0.600000 0.300000";
polyhedron = "0.0 0.0 0.0 1.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 1.0";
scale = "100 100 100";
};
« Last Edit: January 01, 2016, 05:24:15 PM by Quartz »

Now the zone has the follow the player which makes a loop. The scale looks massive lol
« Last Edit: January 01, 2016, 12:54:56 PM by Kyuande »

Does that even exist

Well
Code: [Select]
CommandToClient(%client,'doMouseFire', true); works for mousefire.
I tried it with "jet" and that also works.

So why shouldn't "moveForward" work? Although it might be named a bit different.

This doesn't seem like a default function

Edit: Yep, I recently dumped my command functions, client and server side and nothing exists with 'doMouseFire' and 'moveForward', on the client side only "moveForward" exists as a function and not a client command. You clearly have an add-on that's doing this.
« Last Edit: January 01, 2016, 03:09:59 PM by Kyuande »