Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by MonsterX. 12/05/25 02:43
ZorroFix. ini /data and /log path
by Martin_HH. 12/02/25 11:42
Parameter selection
by jcl. 12/01/25 12:28
ZorroGPT
by TipmyPip. 11/29/25 09:38
webGL
by Ezzett. 11/27/25 23:22
Chart viewer
by clint000. 11/27/25 21:21
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (Quad, AndrewAMD, ozgur), 5,665 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
agasior, mosfet, MonsterX, KF_Investments, Luuk
19186 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Car Project - Brake issue #158745
10/05/07 04:21
10/05/07 04:21
Joined: Nov 2006
Posts: 12
Portugal
J
JoaoR Offline OP
Newbie
JoaoR  Offline OP
Newbie
J

Joined: Nov 2006
Posts: 12
Portugal
Im having a little problem with the car template project, i want increase the brake power when the player press the move_back button ("s"), ive increased the maxtorque brake, but it only change the brake power when we press the handbrake, i think it isnt changing the normal brake...

i copied this from plcar01.wdl, i think this is what takes control of the normal braking, if im not wrong..
Code:
 
// if we drive in one direction and want to change direction, apply brakes
// (my._angSpeed__016>0 checks if rear wheel is turning forward
// direction<0 checks if user hits reverse key
if ((my._angSpeed__016>5 && direction<0) || (my._angSpeed__016<-5 && direction>0))
{
my._targetSpeed__016=0; // brake
// press brakes quarter down when rolling at high speed
if (abs(my._angSpeed__016)>0.50*my._maxAngSpeed__016)//era 25
{
test = 1; //variable to display in the screen
phcon_setmotor(my._wheelRL__016, nullvector, vector(my._angSpeed__016*0.5, 0.5*my._maxTorqueBrake__016,0), nullvector);//era 0.50 e 0.50 my._angSpeed__016*0.9
phcon_setmotor(my._wheelRR__016, nullvector, vector(my._angSpeed__016*0.5, 0.5*my._maxTorqueBrake__016,0), nullvector);
if(abs(my._angSpeed__016)>0.50*my._maxAngSpeed__016)
{
PlCar01_EventBrake(); // braking sound
}
}
else
{
// we're already slow- apply max. units brake torque
phcon_setmotor(my._wheelRL__016, nullvector, vector(0, my._maxTorqueBrake__016,0), nullvector);
phcon_setmotor(my._wheelRR__016, nullvector, vector(0, my._maxTorqueBrake__016,0), nullvector);
}
}


I placed a variable inside this condition to display in the screen to test if this "thingy" was executed and it displayed always test=0 instead of 1 at it should be.

Im using A6 6.60 pro, if it helps...

Ty.

Re: Car Project - Brake issue [Re: JoaoR] #158746
10/08/07 14:44
10/08/07 14:44
Joined: Nov 2006
Posts: 12
Portugal
J
JoaoR Offline OP
Newbie
JoaoR  Offline OP
Newbie
J

Joined: Nov 2006
Posts: 12
Portugal
so, any help available?


Moderated by  HeelX, rvL_eXile 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1