Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Fjose on Oct 26, 2014, 02:36 AM

Title: player.AddSpeed invalid variable
Post by: Fjose on Oct 26, 2014, 02:36 AM
wiki is not 100% updated for that, there are some issues..

what is the true function for set the speed individually?
Title: Re: player.AddSpeed invalid variable
Post by: Honey on Oct 26, 2014, 09:17 AM
player.AddSpeed does not add acceleration speed.It is some sort of speed which interferes with Vectors.Correct Usage is player.AddSpeed( Vector speed ).
Title: Re: player.AddSpeed invalid variable
Post by: Fjose on Oct 26, 2014, 01:33 PM
oh. anyway there is no other way to modify player speed?
Title: Re: player.AddSpeed invalid variable
Post by: Honey on Oct 26, 2014, 02:27 PM
Of course there is, you can use player.RelativeSpeed.

Example to increase Vehicle Acceleration : player.Vehicle.RelativeSpeed*0.5;
Example to Decrease Vehicle Acceleration : player.RelativeSpeed/0.5;
Example to Totally stop a vehicle acceleration : player.RelativeSpeed = 0;
Title: Re: player.AddSpeed invalid variable
Post by: Gudio on Nov 01, 2014, 02:09 PM
You will notice new speed when you're in the air. You can test it by pressing spacebar to jump but don't forget to set speed while falling down.

Sorry for such a late reply, but I forgot my password here and I couldn't get it via e-mail due to bad configuration on this forum (I reported it few days ago).
Title: Re: player.AddSpeed invalid variable
Post by: Fjose on Nov 03, 2014, 09:34 PM
thanks guys for their replies. when I had time I'll test the suggestions. :P
Title: Re: player.AddSpeed invalid variable
Post by: Fjose on Nov 26, 2014, 02:41 AM
sorry for bump my own topic, today I've tested honey suggestions and I got an error..

"Member Variable not found"

1) player.RelativeSpeed = 0;

2) player.RelativeSpeed / 0.5;

maybe not exists these functions :(
Title: Re: player.AddSpeed invalid variable
Post by: Honey on Nov 26, 2014, 11:34 AM
It's Vehicle.RelativeSpeed
Title: Re: player.AddSpeed invalid variable
Post by: Fjose on Nov 26, 2014, 12:47 PM
Quote from: Honey on Nov 26, 2014, 11:34 AMIt's Vehicle.RelativeSpeed

and why you said player.RelativeSpeed '-'
two examples with player.RelativeSpeed and one with player.Vehicle.RelativeSpeed.

anyway I want the speed only for the player, no for player inside vehicle, maybe this function was not added :/ because the only one is player.AddSpeed but this callback doesn't exists
Title: Re: player.AddSpeed invalid variable
Post by: Honey on Nov 26, 2014, 02:12 PM
player.AddSpeed does exist but only .Z Vector which makes the person fly in the air ( metaphorically )
Title: Re: player.AddSpeed invalid variable
Post by: Fjose on Nov 26, 2014, 02:48 PM
I have not more option to wait for that function :/

Topic Locked. Definitely
Title: Re: player.AddSpeed invalid variable
Post by: Stormeus on Nov 27, 2014, 05:22 AM
Overriding lock to clarify because there have been a lot of wrong answers here.

There are two ways of dealing with a player's speed:

If you wanted to throw a player into the air, you would have a few options:

player.Speed.Z += 15.0;
or
player.Speed += Vector(0.0, 0.0, 15.0);
or
player.AddSpeed(0.0, 0.0, 15.0);

If these functions absolutely do not work, post the error and we'll figure out from there if it is a bug or a script error.