Jump to content

Opening up the SA street races


Brit_Bllt

Recommended Posts

I'm working on opening up San Andreas right from the start, with some differences from any existing mod, and most of it's gone smoothly enough. But I'm completely stuck on getting the street races to work right from the beginning. Here's what I've figured out so far.

 

The code that unlocks all the races seems to be...

 

 

:MOB_SF_970if  $CALL_ANSWERED == 1 else_jump @MOB_SF_1079 $1398 = 1 Marker.Disable($528)Marker.Disable($529)Marker.Disable($530)Marker.Disable($531)0570: $528 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[0] $Y_RACE_TOURNAMENT_POINT[0] $Z_RACE_TOURNAMENT_POINT[0] 0570: $529 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[1] $Y_RACE_TOURNAMENT_POINT[1] $Z_RACE_TOURNAMENT_POINT[1] 0570: $530 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[2] $Y_RACE_TOURNAMENT_POINT[2] $Z_RACE_TOURNAMENT_POINT[2] 0570: $531 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[3] $Y_RACE_TOURNAMENT_POINT[3] $Z_RACE_TOURNAMENT_POINT[3] 

 

 

Okay, so the flag for unlocking the races seems to be $1398, and it creates four markers. Going to @TRACE, we see...

 

 

:TRACE_359if   Player.Defined($PLAYER_CHAR)else_jump @TRACE_769 if   Player.Controllable($PLAYER_CHAR)else_jump @TRACE_769 if  $1398 == 1 else_jump @TRACE_769 if 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere $X_RACE_TOURNAMENT_POINT[0] $Y_RACE_TOURNAMENT_POINT[0] $Z_RACE_TOURNAMENT_POINT[0] radius 1.2 1.2 2.0 on_foot else_jump @TRACE_499 $ONMISSION = 1 Player.CanMove($PLAYER_CHAR) = False00BA: show_text_styled GXT 'TRACE_1' time 1000 style 2  // Race Tournament$CUSTOM_TOURNAMENT_FLAG = 1 04AE: $CURRENT_TOURNAMENT = 0 // $ = any start_mission 35  // Race Tournament / 8-track / Dirt Track

 

 

Okay, so it checks the $1398 flag, it checks the player location and that's it. Simple enough.

 

So I just go back to start of the script and add in a $1398 flag, like this...

 

 

$LOWR_CONT_SCRIPT_LAUNCHED = 0 $MISSION_CESAR_VIALPANDO_PASSED = 0 $RACE_INDEX = 0 $1398 = 1

 

 

And then I add the four race marker generators to the startup marker spawns, like this...

 

 

0570: $630 = create_asset_radar_marker_with_icon 36 at $2367 $2368 $2369 0570: $632 = create_asset_radar_marker_with_icon 36 at $2367 $2368 $2369 0570: $528 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[0] $Y_RACE_TOURNAMENT_POINT[0] $Z_RACE_TOURNAMENT_POINT[0] 0570: $529 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[1] $Y_RACE_TOURNAMENT_POINT[1] $Z_RACE_TOURNAMENT_POINT[1] 0570: $530 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[2] $Y_RACE_TOURNAMENT_POINT[2] $Z_RACE_TOURNAMENT_POINT[2] 0570: $531 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[3] $Y_RACE_TOURNAMENT_POINT[3] $Z_RACE_TOURNAMENT_POINT[3] $LSGYM_ICON = Marker.CreateIconAndSphere($ICON_SWEET, 2228.0, -1722.811, 12.5543)

 

 

And then I add in the racing thread, @trace...

 

 

create_thread @ODDVEH create_thread @R3 create_thread @GYM create_thread @SHOOT create_thread @BLOODR create_thread @HOTR create_thread @KICKS create_thread @PSAVE1 create_thread @FLOW create_thread @HELP create_thread @COLLS create_thread @CRANES create_thread @BUY_PRO create_thread @VALET_L create_thread @ADPLANE create_thread @TRAINSL create_thread @IMPND_L create_thread @OPENUP create_thread @TRI create_thread @TRACE

 

 

And nothing. I tried replacing the tournament variables with the raw coordinates, but still nothing. I tried removing all references to $1398 so that it's not even a condition for starting the mission, but still nothing; the markers aren't even appearing. There's probably something obvious I'm missing, but I can't figure out what. facedesk.gif

Link to comment
Share on other sites

spaceeinstein

Just delete the checks if the missions have been passed. You don't have to touch any variables. For the code above, delete this

if

$1398 == 1

else_jump @TRACE_769

When using create_thread @TRACE, make sure to remove the one created by default so that you won't get two threads created.

Edited by spaceeinstein
Link to comment
Share on other sites

Woo hoo! Thank you, I finally got it to work! I did the above, just removing the check rather than changing the variable, but still couldn't get the markers to appear. I finally took the sphere creation code and, instead of using the main thread, moved it to the same thread that creates the 8-Track marker in Mission 0, since it's already open from the start (except I changed the variables to actual coordinates, since the code that assigns those variables only comes later). Like this, in case anyone else wants to use it...

 

 

0570: $1739 = create_asset_radar_marker_with_icon 33 at $1742 $1743 $1744 0570: $1740 = create_asset_radar_marker_with_icon 33 at $1745 $1746 $1747 0570: $1741 = create_asset_radar_marker_with_icon 33 at $1748 $1749 $1750 0570: $528 = create_asset_radar_marker_with_icon 53 at 1766.134 -1704.228 12.4731 0570: $529 = create_asset_radar_marker_with_icon 53 at -1922.922 282.7151 40.0391 0570: $530 = create_asset_radar_marker_with_icon 53 at 1636.916 912.9478 9.689 0570: $531 = create_asset_radar_marker_with_icon 53 at 1701.69 1649.193 9.6296 

 

 

The bottom four are the new tournament markers (I don't think it'd hurt anything to leave the old ones, but I removed them anyway just to avoid any future trouble and because they're redundant).

 

That, plus removing the mission check like you said, plus adding create_thread @TRACE, plus removing the duplicate create_thread equals all the tournaments being open from the start. smile.gif

Edited by Brit_Bllt
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.