help with gear ratio

Talk about making games.

help with gear ratio

Postby lllllvenomlllll » Wed Dec 01, 2010 10:30 am

i need some help with gear ratio somthing like what im trying to do is set button down creat timer
1st=1;
yvelocity=yvelocity+0.5;
if(yvelocity=1.0)
DestroyTimer("1st");

next would be secont gear
1st=0;
2nt=1;
yvelocity=yvelocity+0.4;
if(yvelocity=3.0)
DestroyTimer("2nt");

and so on but im shure the finished code would look nothing like shit but just the idea of what im trying to do any body got any ideas how i can set speed so it picks up slowly
and u have to hit a button like 2 button to change to secont gear and when u let off the button the car slowly starts slowing down and when it gets to the desired yvelocity for it to change to the lower gear
lllllvenomlllll
 
Posts: 20
Joined: Wed Dec 01, 2010 10:21 am
Score: 0 Give a positive score

Re: help with gear ratio

Postby Hblade » Wed Dec 01, 2010 11:48 am

Have 2 "=" signs in an if statement, you have:
if (yvelocity=1)

use
if (yvelocity==1)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: help with gear ratio

Postby lllllvenomlllll » Wed Dec 01, 2010 11:54 am

thats not the code im going to use still brain storming on how to code it so i wasnt trying to post correct code
lllllvenomlllll
 
Posts: 20
Joined: Wed Dec 01, 2010 10:21 am
Score: 0 Give a positive score

Re: help with gear ratio

Postby Hblade » Wed Dec 01, 2010 1:27 pm

oh, kk
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: help with gear ratio

Postby lllllvenomlllll » Wed Dec 01, 2010 1:42 pm

speed=speed+1;
yvelocity=-speed;
view.yvelocity=-speed;



if(speed==2)
DestroyTimer("1st");

this isnt working but somthing like this i cant figure it out game editor is wack the way he ree wrote the c code to make it easy to use wich it nice but it dont count math in numerical correct values such as 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1
lllllvenomlllll
 
Posts: 20
Joined: Wed Dec 01, 2010 10:21 am
Score: 0 Give a positive score

Re: help with gear ratio

Postby lllllvenomlllll » Wed Dec 01, 2010 2:54 pm

here is demo of my game im calling race king the idea is to burn rubber through americas back country roads while racing ur choice of car and u will also be able to choose ur aponents car,while racing u will have to watch out for cars crossing the road fallen tree branches and while weaving ur way in and out of traffic. ur brack is down arrow,gass is up arrow steer left and right arrow im not doing gears it just wont work but check it out and tell me what u think.
Attachments
race_king.zip
(1.53 MiB) Downloaded 61 times
lllllvenomlllll
 
Posts: 20
Joined: Wed Dec 01, 2010 10:21 am
Score: 0 Give a positive score

Re: help with gear ratio

Postby lllllvenomlllll » Fri Dec 03, 2010 9:11 am

braking,top speed,acceleration,turning
1 2 3 1 2 3 1 2 3 1 2 3 = points aloud max 8

braking
1=700
2=500
3=300

top speed
1=8
2=10
3=12

acceleration
1=1500
2=1200
3=1000

turning
1=1
2=1.5
3=2



if(animindex==getAnimIndex("cautico2")){
braking =1
tope speed =2
acceleration=2
turning =1

if(animindex==getAnimIndex("car_flames")){
braking =2
top speed =2
acceleration=3
turning =1

if(animindex==getAnimIndex("car_redwhite")){
braking =2
tope speed =2
acceleration=2
turning =1


if(animindex==getAnimIndex("car_purple_stripes")){
braking =2
tope speed =2
acceleration=2
turning =1


if(animindex==getAnimIndex("car_bluestripes")){
braking =1
tope speed =3
acceleration=1
turning =2


if(animindex==getAnimIndex("testarossa_gy")){
braking =3
tope speed =1
acceleration=1
turning =3


if(animindex==getAnimIndex("testarossa_gwr")){
braking =7
tope speed =2
acceleration=1
turning =2


if(animindex==getAnimIndex("cautico_bluestripes")){
braking =1
tope speed =2
acceleration=2
turning =2


if(animindex==getAnimIndex("semitruck")){
braking =1
tope speed =3
acceleration=1
turning =2


if(animindex==getAnimIndex("van1")){
braking =1
tope speed =2
acceleration=1
turning =2

if(animindex==getAnimIndex("testarossa2")){
braking =1
tope speed =3
acceleration=2
turning =2


if(animindex==getAnimIndex("testarossa")){
braking =2
tope speed =2
acceleration=2
turning =2
lllllvenomlllll
 
Posts: 20
Joined: Wed Dec 01, 2010 10:21 am
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest