Quantcast

Jump to content

» «
Photo

Here is my code snippet. How to modify the speed of player's car i

3 replies to this topic
rerse
  • rerse

    Player Hater

  • Members
  • Joined: 02 Nov 2011

#1

Posted 11 October 2013 - 02:55 PM

004F: create_thread ŁŁLabel00AB57 

..............

:Label00AB57
0001: wait  0 ms
00D6: if  1
0256:   player $PLAYER_CHAR defined
004D: jump_if_false ŁŁLabel00AB57
00D6: if  1
00E0:   player $PLAYER_CHAR driving
00E1:   key_pressed  0  3
004D: jump_if_false ŁŁLabel00AB57
03C1:  0@ = player $PLAYER_CHAR car
00D6: if  0
81F3:   NOT   car 0@ airborne
004D: jump_if_false ŁŁLabel00AB57
02E3:  9@ = car  0@ speed
0013:  9@ *=  0.99  ;; floating-point values (never used in VC or GTA 3)
04BA: set_car  0@ speed_instantly  9@
018C: play_sound  1 at  3@  4@  5@
0001: wait  300 ms
03C1:  0@ = player $PLAYER_CHAR car
0002: jump ŁŁLabel00AB57

This code reduces the car speed when the player press the forward/backward leaning button. But this method is bad.

 

Is there any other way to reduce the car's speed with main.scm?

 

(Don't say the handling.cfg!)


Jack...
  • Jack...

    Wanted Level modifications

  • Feroci Racing
  • Joined: 06 Dec 2011
  • Serbia

#2

Posted 11 October 2013 - 05:17 PM

Try using
00AD: set_car_cruise_speed 0@ to 9@
instead of
04BA: set_car 0@ speed_instantly 9@
Also you can decrease that 0.99 value a little.
And use CLEO - there's no need for ruining the save games or wasting time creating a thread inside a main. And the Mission Builder is a very old tool - use Sanny Builder instead - it's much more usefull.

SHooZ
  • SHooZ

    Just for Lulz

  • Members
  • Joined: 11 Oct 2013
  • Ukraine

#3

Posted 11 October 2013 - 05:18 PM

use Sanny Builder.


rerse
  • rerse

    Player Hater

  • Members
  • Joined: 02 Nov 2011

#4

Posted 13 October 2013 - 12:42 PM Edited by rerse, 13 October 2013 - 12:44 PM.

Try using

00AD: set_car_cruise_speed 0@ to 9@
instead of
04BA: set_car 0@ speed_instantly 9@
Also you can decrease that 0.99 value a little.
And use CLEO - there's no need for ruining the save games or wasting time creating a thread inside a main. And the Mission Builder is a very old tool - use Sanny Builder instead - it's much more usefull.

 

 

Unfortunately it doesn't work, becuase set_car_cruise_speed works only for NPC cars.

 

Is there any way to change car speed from main.scm?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users