Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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