IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 PIT maneuver

 
HeresOtis  
Posted: Thursday, May 10 2012, 02:57
Quote Post


Mark Chump
Group Icon
Group: Members
Joined: Apr 29, 2011

XXXXX



How does the game detect if a car has been PITted like in driving school where you have to do a PIT maneuver on a car?
I gathered this snippet of coding from main.scm and trying to understand it:
CODE
06A2: get_car 435@ velocity_in_direction_XYZ 357@ 358@ 359@ // 435@ is the car that has to be pitted
0087: 364@ = 357@ // (float)
006B: 364@ *= 357@ // (float)
0087: 365@ = 358@ // (float)
006B: 365@ *= 358@ // (float)
0087: 361@ = 364@ // (float)
005B: 361@ += 365@ // (float)
01FB: 360@ = square_root 361@
02F8: get_car 435@ Z_angle_cosine_to 355@
02F9: get_car 435@ Z_angle_sine_to 356@
0087: 364@ = 357@ // (float)
006B: 364@ *= 355@ // (float)
0087: 365@ = 358@ // (float)
006B: 365@ *= 356@ // (float)
0087: 362@ = 364@ // (float)
005B: 362@ += 365@ // (float)
0087: 364@ = 362@ // (float)
006B: 364@ *= 362@ // (float)
0087: 365@ = 361@ // (float)
0063: 365@ -= 364@ // (float)
01FB: 363@ = square_root 365@
0087: 364@ = 363@ // (float)
0073: 364@ /= 362@ // (float)
if
 364@ > 2.2
else_jump @STEAL1_5041
Car.SetAnimation(435@, 6, 2000) // idk what animation this is, I looked on the GTAG documentation but this wasn't on the list of animations
40@ = 3
49@ = 0
jump @STEAL1_5055

:STEAL1_5041
40@ = 2
49@ = 0

:STEAL1_5055
if
 40@ == 3
else_jump @STEAL1_5187
if
  not Car.Wrecked(435@)
else_jump @STEAL1_5187
00BE: text_clear_all
0687: clear_actor 443@ task
Car.SetMaxSpeed(435@, 0.0)
00BC: show_text_highpriority GXT 'STL1_05' time 5000 flag 1  // ~s~Steal the ~b~car~s~.
03CD: disable_car 435@ stuck_check
Marker.Disable(436@)
436@ = Marker.CreateAboveCar(435@)
07E0: set_marker 436@ type_to 1
if
01C1:   car 435@ stopped
else_jump @STEAL1_5187
05CF: AS_actor 443@ exit_car 435@ when_at 438@ 439@ 440@
34@ = 3

This code was used on mission Zeroing In where you have to follow the woman's pink car and steal it.
PM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG