Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AbrahamR, wdlmaster, 7th_zorro, dr_panther, 1 invisible), 764 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | chip programmers | 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