Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Shagg_E

[CLEO]CarRec(plus ObjRec)

Recommended Posts

Shagg_E

Have you ever noticed random GTA physics? You can make car to jump on certain ramp in a certain coords in script, but it will fall every time a little randomly.

To prevent that problem in SA, Rockstar* made ".rrr" files(in carrec.img), which contains recorded "paths" of vehicles movements. It allowed to create scenes like this.

 

Now it's possible in Vice City, but not car records only...

 

 

"CarRec":

 

 

"CarRec" gives you ability to record car movements into ".cr" file for playback them later in your scripts or missions.

 

Installation:

 

Drop all files and "RECORDINGS" folder from "1. CarRec\CLEO\" into your Vice City's "CLEO" folder, if you has installed last version of CLEO library(http://cleo.li/).

 

How to use:

 

Activation/deactivation(while in car): C + 1

Then you can:

1) To record your vehicle's movements press R.

Press R again to stop recording.

2) To playback your last recording press P.

Press O to pause playback.

Hold I to rewind.

Press P again to stop playback.

 

You can also config "CarRec" in "CLEO\CarRec.ini":

MEMLIMIT:

Allocated memory limit for recording in bytes. Higher value - longer record. Too high values may cause slower working of script.

CLRTRWREC:

Clear traffic while recording: 1 - yes, 0 - no

CLRTRWPLA:

Clear traffic while playback: 1 - yes, 0 - no

HIDEZCNAM:

Hide zone/car names to prevent some bugs: 1 - yes, 0 - no

SHOWALLST:

Show all script's text: 1 - yes, 0 - no

 

Every time you making a record, script creates "carrec.cr" file in "CLEO\RECORDINGS\" folder.

If file already exists - "CarRec" will overwrite it.

Then you can rename this file and use it in your scripts and missions(read "3. For Scripters\How to[ENG].txt").

You can also see some examples of using that recordings in "2. Examples" folder:

1)1CarScene:

Scene with one recorded car.

Activation/deactivation: C + 2

2)2CarsScene:

Scene with two recorded cars.

Activation/deactivation: C + 3

3)10CarsScene:

Scene with ten recorded vehicles.

Activation/deactivation: C + 4

4)360Scene:

Scene with four recorded vehicles, one recorded object(detached infernus's wheel), effects and actors.

Activation/deactivation: C + 5

 

"ObjRec":

 

 

 

You can also to record objects movements using SCM functions from "3. For Scripters\SCM FUNCTIONS" (read more in "3. For Scripters\How to[ENG].txt").

 

You can see an example of using that in "360Scene", when one detached infernus's wheel moves exactly into helicopter's rear rotor every time you playback this scene.

 

 

.CR file structure:

 

 

Each recording contains in ".cr" file consists of "frames". Each frame has this structure(0x30 bytes per frame):

 

0x00 - INT32 - Timekey in ms

0x04 - INT16 - XYZ.right.x

0x06 - INT16 - XYZ.right.y

0x08 - INT16 - XYZ.right.z

0x0A - INT16 - XYZ.up.x

0x0C - INT16 - XYZ.up.x

0x0E - INT16 - XYZ.up.x

0x10 - FLOAT - XYZ.pos.x

0x14 - FLOAT - XYZ.pos.x

0x18 - FLOAT - XYZ.pos.x

0x1C - INT16 - x push

0x1E - INT16 - y push

0x20 - INT16 - z push

0x22 - INT16 - x turn speed

0x24 - INT16 - y turn speed

0x26 - INT16 - z turn speed

0x28 - INT8 - Steering Angle

0x29 - INT8 - Accelerator Pedal Power

0x2A - INT8 - Brake Pedal Power

0x2B - INT8 - Hand Brake Status

0x2C - INT8 - Horn Status

0x2D-0x30 - 3 bytes - Reserved

 

Recording and playback doesn't depends of FPS: they attached to game timer so it doesn't matter if you record on 60 FPS and playing this recording at 30 FPS or vice versa.

 

 

.OR file structure:

 

 

(0x28 bytes per frame):

 

0x00 - INT32 - Timekey in ms

0x04 - INT16 - XYZ.right.x

0x06 - INT16 - XYZ.right.y

0x08 - INT16 - XYZ.right.z

0x0A - INT16 - XYZ.up.x

0x0C - INT16 - XYZ.up.x

0x0E - INT16 - XYZ.up.x

0x10 - FLOAT - XYZ.pos.x

0x14 - FLOAT - XYZ.pos.x

0x18 - FLOAT - XYZ.pos.x

0x1C - INT16 - x push

0x1E - INT16 - y push

0x20 - INT16 - z push

0x22 - INT16 - x turn speed

0x24 - INT16 - y turn speed

0x26 - INT16 - z turn speed

 

 

Some Stuff:

 

 

 

You can free use, share and modify all files, included in archive.

 

by Shagg_E

 

Credits:

 

DK - "Core" of the script (binary files operations), support

xanser - Solving movement lags problem

spaceeinstein - Solving vehicle's horn problem

kenking - Solving wheel's detaching problem

=SpitFire= - Help and support

mfisto - Help

 

 

 

DOWNLOAD

(mirror download)

Edited by Shagg_E

Share this post


Link to post
Share on other sites
Apu889

holy sh*t this is awesome! is it possible to do in SA?

Share this post


Link to post
Share on other sites
Shagg_E

holy sh*t this is awesome! is it possible to do in SA?

Yeah,

...

Share this post


Link to post
Share on other sites
spartaque12

this mod just gorgeous

Share this post


Link to post
Share on other sites
Hugo's Drawing

This mod it's very funny xD

Share this post


Link to post
Share on other sites
JohnsonHu
Posted (edited)

I installed the mod and it works perfectly but how can i make a playback with 2 cars or like these found in the examples folder i know you need to script but it would be easier if it was explained in a video for gta vc

Edited by JohnsonHu

Share this post


Link to post
Share on other sites
Shagg_E
Posted (edited)
2 hours ago, JohnsonHu said:

I installed the mod and it works perfectly but how can i make a playback with 2 cars or like these found in the examples folder i know you need to script but it would be easier if it was explained in a video for gta vc

Just copy all SCM functions from "CarRec2CarsScene"(more relatable example, added in the end of this comment) or "CarRec10CarsScene"(more complex example with the economy of variables) to any place of your CLEO script or main.scm, then all you need to do is:

1) Load recording file before playback:

0AB1: call_scm_func @CARRECORD_READCR 1 file 1 store to [email protected] // read file 1, store to CarAllocMemoryAddress([email protected])

, where
"file 1" is just a number that will affect which file will be loaded by "CARRECORD_READCR" SCM function. Just look at this function and how it chooses the file depending on this number, and you will understand it.
[email protected] - can be replaced by any other variable. Must be unique for each vehicle.

 

2) Then you need to call this function every frame for playback:

0AB1: call_scm_func @CARRECORD_PLAYBACK 4 [email protected] [email protected] 0 0 [email protected] // CarHandle, AllocMemoryAddress, SetFrame, ShowInfo, GetFrame

, where
[email protected] - vehicle's handle.
[email protected] - unique variable from previous loading function.
0 - first playback frame. Yes, you can start playback from any point of recording(for recordings synchronization).
0 - "show info text" trigger.
[email protected] - get current playback frame(for conditions).

Stop calling this function to stop playback.

 

3) Unload memory:

0AC9: free_allocated_memory [email protected]

[email protected] - unique variable from previous functions.

 

 

I know, it's not a very comfortable solution. That's why I working on new opcodes that will include a new way for creating and playback these and a few other types of recordings. But I don't think it will be finished in the coming months, unfortunately...

 

 

Here are the SCM functions from "CarRec2CarsScene":

Spoiler
//-----------------------------------------------------------------------------------------------------------------
//--------------------------------------------------SCM FUNCTIONS--------------------------------------------------

:IF1OR2KEYSPRESSEDANDTHENRELEASED
0006: [email protected] = 0
8039:   NOT [email protected] == 0
jf @IF1OR2KEYSPRESSEDANDTHENRELEASED_RETURN
0006: [email protected] = 1 // keys number
0AB0: key_pressed [email protected]
jf @IF1OR2KEYSPRESSEDANDTHENRELEASED_RETURN
8039:   NOT [email protected] == 0
jf @IF1OR2KEYSPRESSEDANDTHENRELEASED_CHECKWHENRELEASED
0006: [email protected] = 2 // keys number
0AB0: key_pressed [email protected]
jf @IF1OR2KEYSPRESSEDANDTHENRELEASED_RETURN

:IF1OR2KEYSPRESSEDANDTHENRELEASED_CHECKWHENRELEASED
wait 0
0AB0: key_pressed [email protected]
jf @IF1OR2KEYSPRESSEDANDTHENRELEASED_DONE
0019:   [email protected] > 1
jf @IF1OR2KEYSPRESSEDANDTHENRELEASED_CHECKWHENRELEASED
8AB0: NOT key_pressed [email protected]
jf @IF1OR2KEYSPRESSEDANDTHENRELEASED_CHECKWHENRELEASED

:IF1OR2KEYSPRESSEDANDTHENRELEASED_DONE
0006: [email protected] = 1

:IF1OR2KEYSPRESSEDANDTHENRELEASED_RETURN 
0AB2: ret 1 [email protected]

:CARRECORD_READCR
0039:   [email protected] == 1
jf @CARRECORD_READCR2
0AA7: call_function 0x48DF90 num_params 2 pop 2 "rb" "cleo\\recordings\\cr2css1.cr" [email protected] // file = CFileMgr::Open("cleo\recordings\cr2css1.cr", "rb");
jump @CARRECORD_READCR_GO

:CARRECORD_READCR2
0AA7: call_function 0x48DF90 num_params 2 pop 2 "rb" "cleo\\recordings\\cr2css2.cr" [email protected] // file = CFileMgr::Open("cleo\recordings\cr2css2.cr", "rb");

:CARRECORD_READCR_GO
// Get file size to [email protected]:
0AA5: call 0x48DEE0 num_params 3 pop 3 2 0 [email protected] // CFileMgr::Seek(file, 0, SEEK_END);
0AA7: call_function 0x652D50 num_params 1 pop 1 [email protected] [email protected] // size = ftell(file);
// Go to beginning of the file:
0AA5: call 0x48DEE0 num_params 3 pop 3 0 0 [email protected] // CFileMgr::Seek(file, 0, SEEK_SET);
// Now start reading:
000A: [email protected] += 0xFF // just some reserve
0AC8: [email protected] = allocate_memory_size [email protected]
000E: [email protected] -= 0xFF
0006: [email protected] = 0x00
0085: [email protected] = [email protected]
000A: [email protected] += 0x04 // first 4 bytes is reserved for global timer
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1 // recording file size
000A: [email protected] += 0x08 // next 4 bytes is reserved for current frame number

:CARRECORD_READCR_GO2
if
801D:   NOT [email protected] > [email protected]
jf @CARRECORD_READCR_RETURN
0085: [email protected] = [email protected]
005A: [email protected] += [email protected]
0AA5: call 0x48DF50 num_params 3 pop 3 4 [email protected] [email protected] // CFileMgr::Read(file, var_offset, 4);
000A: [email protected] += 0x04    
jump @CARRECORD_READCR_GO2

:CARRECORD_READCR_RETURN
0AA5: call 0x48DEA0 num_params 1 pop 1 [email protected] // CFileMgr::Close(file);
0AB2: ret 1 [email protected]

:CARRECORD_PLAYBACK
0085: [email protected] = [email protected]
0085: [email protected] = [email protected]
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1 // getting saved global timer
0085: [email protected] = [email protected]
000A: [email protected] += 0x04 
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1 // getting file size
000E: [email protected] -= 0x60 // last few bytes of .cr file may be corrupted so we'll skip 2 frames to prevent some bugs
000A: [email protected] += 0x04 
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1 // getting current frame number
8039:   NOT [email protected] == 0 // if frame is predetermined
jf @CARRECORD_PLAYBACK_START
0085: [email protected] = [email protected]
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1 // saving predetermined frame number
gosub @CARRECORD_PLAYBACK_GETCURRENTOFFSET
jump @CARRECORD_PLAYBACK_CHECKOFFSET

:CARRECORD_PLAYBACK_START
0039:   [email protected] == 0
jf @CARRECORD_PLAYBACK_CHECKOFFSET

:CARRECORD_PLAYBACK_RESTART
0006: [email protected] = 0
01BD: [email protected] = current_time_in_ms
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1 // saving current global timer
0006: [email protected] = 0
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1 // saving zero frame
jump @CARRECORD_PLAYBACK_CHECKOFFSET

:CARRECORD_PLAYBACK_CHECKOFFSET
gosub @CARRECORD_PLAYBACK_GETCURRENTOFFSET
001D:   [email protected] > [email protected]
jf @CARRECORD_PLAYBACK_RESTART
0093: [email protected] = integer [email protected] to_float
0093: [email protected] = integer [email protected] to_float
0073: [email protected] /= [email protected]
0013: [email protected] *= 100.0
0092: [email protected] = float [email protected] to_integer // playback percent
// Check Time:
gosub @PLAYBACK_GETADDRESSBYOFFSET
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1
8039:   NOT [email protected] == 0 // if frame is predetermined
jf @CARRECORD_PLAYBACK_CHECKTIME
01BD: [email protected] = current_time_in_ms
0062: [email protected] -= [email protected]
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1 // saving pause-mode global timer
0006: [email protected] = 0
0085: [email protected] = [email protected]
0016: [email protected] /= 1000
jump @CARRECORD_PLAYBACK_APPLYVALUES

:CARRECORD_PLAYBACK_CHECKTIME
01BD: [email protected] = current_time_in_ms
0062: [email protected] -= [email protected]
0085: [email protected] = [email protected]
0016: [email protected] /= 1000
002D:   [email protected] >= [email protected]  // if there is recording for this time
jf @CARRECORD_PLAYBACK_RETURN // else nothing to do here

:CARRECORD_PLAYBACK_SKIPTIME
000A: [email protected] += 1
gosub @CARRECORD_PLAYBACK_GETCURRENTOFFSET
001D:   [email protected] > [email protected]
jf @CARRECORD_PLAYBACK_RESTART
gosub @PLAYBACK_GETADDRESSBYOFFSET
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1
001D:   [email protected] > [email protected]
jf @CARRECORD_PLAYBACK_SKIPTIME
000E: [email protected] -= 1

:CARRECORD_PLAYBACK_APPLYVALUES
gosub @CARRECORD_PLAYBACK_GETCURRENTOFFSET
gosub @PLAYBACK_GETADDRESSBYOFFSET
000A: [email protected] += 1 
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1 // saving next frame number
000E: [email protected] -= 1 // back to current frame number
000A: [email protected] += 0x04
0085: [email protected] = [email protected]
0A97: [email protected] = car [email protected] struct
// Playback Matrix:
0085: [email protected] = [email protected] 
000A: [email protected] += 0x04 // right x 
gosub @PLAYBACK_APPLYROTVALUEFROMINT16 // playback right x
000A: [email protected] += 0x04 // right y 
gosub @PLAYBACK_APPLYROTVALUEFROMINT16 // playback right y
000A: [email protected] += 0x04 // right z 
gosub @PLAYBACK_APPLYROTVALUEFROMINT16 // playback right z
000A: [email protected] += 0x08 // up x 
gosub @PLAYBACK_APPLYROTVALUEFROMINT16 // playback up x
000A: [email protected] += 0x04 // up y
gosub @PLAYBACK_APPLYROTVALUEFROMINT16 // playback up y
000A: [email protected] += 0x04 // up z
gosub @PLAYBACK_APPLYROTVALUEFROMINT16 // playback up z
000A: [email protected] += 0x18 // position x 
gosub @PLAYBACK_APPLYVALUE // playback position x
000A: [email protected] += 0x04 // position y
gosub @PLAYBACK_APPLYVALUE // playback position y
000A: [email protected] += 0x04 // position z
gosub @PLAYBACK_APPLYVALUE // playback position z
// Playback Movement Speed:
if
0019:   [email protected] > 0
jf @CARRECORD_PLAYBACK_NOPUSH
0085: [email protected] = [email protected]
000A: [email protected] += 0x70 // x push
gosub @PLAYBACK_APPLYSPDVALUEFROMINT16 // playback x push
000A: [email protected] += 0x04 // y push
gosub @PLAYBACK_APPLYSPDVALUEFROMINT16// playback y push
000A: [email protected] += 0x04 // z push
gosub @PLAYBACK_APPLYSPDVALUEFROMINT16 // playback z push
// Playback Turn Speed:
000A: [email protected] += 0x04 // x turn speed
gosub @PLAYBACK_APPLYSPDVALUEFROMINT16 // playback x turn speed
000A: [email protected] += 0x04 // y turn speed
gosub @PLAYBACK_APPLYSPDVALUEFROMINT16 // playback y turn speed
000A: [email protected] += 0x04 // z turn speed
gosub @PLAYBACK_APPLYSPDVALUEFROMINT16 // playback z turn speed
jump @CARRECORD_PLAYBACK_FINISH

:CARRECORD_PLAYBACK_NOPUSH
0085: [email protected] = [email protected]
000A: [email protected] += 0x70 // x push
gosub @PLAYBACK_APPLYZERO // playback x push
000A: [email protected] += 0x04 // y push
gosub @PLAYBACK_APPLYZERO // playback y push
000A: [email protected] += 0x04 // z push
gosub @PLAYBACK_APPLYZERO // playback z push
// Playback Turn Speed:
000A: [email protected] += 0x04 // x turn speed
gosub @PLAYBACK_APPLYZERO // playback x turn speed
000A: [email protected] += 0x04 // y turn speed
gosub @PLAYBACK_APPLYZERO // playback y turn speed
000A: [email protected] += 0x04 // z turn speed
gosub @PLAYBACK_APPLYZERO // playback z turn speed

:CARRECORD_PLAYBACK_FINISH
// Playback Extra Values:
000A: [email protected] += 0x168 // steering angle (negative = wheels right; positive = wheels left)
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1
gosub @PLAYBACK_CHECKBYTEREADINGERROR
0093: [email protected] = integer [email protected] to_float
0017: [email protected] /= 20.0
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
000A: [email protected] += 0x01
000A: [email protected] += 0x04 // accelerator pedal power
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1
gosub @PLAYBACK_CHECKBYTEREADINGERROR
0093: [email protected] = integer [email protected] to_float
0017: [email protected] /= 100.0
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
000A: [email protected] += 0x01
000A: [email protected] += 0x04 // brake pedal power
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1
gosub @PLAYBACK_CHECKBYTEREADINGERROR
0093: [email protected] = integer [email protected] to_float
0017: [email protected] /= 100.0
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
000A: [email protected] += 0x01
000A: [email protected] += 0x05 // hand brake/heli weapon status (16 - off, 48 - on)
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1
0A8C: write_memory [email protected] size 1 value [email protected] virtual_protect 1
0019:   [email protected] > 16
jf @CARRECORD_PLAYBACK_FINISH2
if or
0137:   car [email protected] model == 155 // hunter
0137:   car [email protected] model == 177 // seaspar 
jf @CARRECORD_PLAYBACK_FINISH2
0541: fire_guns_on_vehicle [email protected]

:CARRECORD_PLAYBACK_FINISH2
000A: [email protected] += 0x01
000A: [email protected] += 0x4C // activate horn/siren
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1
0A8C: write_memory [email protected] size 1 value [email protected] virtual_protect 1

:CARRECORD_PLAYBACK_RETURN
0039:   [email protected] == 1
jf @CARRECORD_PLAYBACK_RETURN2
0AD1: show_formatted_text_highpriority "~p~PLAYBACK: %d sec. ~h~Frame: ~p~%d ~h~(~p~%d%% ~h~of full recording)" time 100 [email protected] [email protected] [email protected]

:CARRECORD_PLAYBACK_RETURN2
0AB2: ret 1 [email protected]

:CARRECORD_PLAYBACK_GETCURRENTOFFSET
0085: [email protected] = [email protected] // get current frame
0012: [email protected] *= 0x30 // multiply on frame size
000A: [email protected] += 0x0C // plus start offset - now we got current offset
return

:PLAYBACK_GETADDRESSBYOFFSET
0085: [email protected] = [email protected]
005A: [email protected] += [email protected]
return

:PLAYBACK_APPLYVALUE
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
000A: [email protected] += 0x04
return

:PLAYBACK_APPLYROTVALUEFROMINT16
0A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 1
0019:   [email protected] > 32767
jf @PLAYBACK_APPLYROTVALUEFROMINT16_RETURN
000E: [email protected] -= 65536

:PLAYBACK_APPLYROTVALUEFROMINT16_RETURN
0093: [email protected] = integer [email protected] to_float
0017: [email protected] /= 30000.0
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
000A: [email protected] += 0x02
return

:PLAYBACK_APPLYSPDVALUEFROMINT16
0A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 1
0019:   [email protected] > 32767
jf @PLAYBACK_APPLYSPDVALUEFROMINT16_RETURN
000E: [email protected] -= 65536

:PLAYBACK_APPLYSPDVALUEFROMINT16_RETURN
0093: [email protected] = integer [email protected] to_float
0017: [email protected] /= 10000.0
0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 1
000A: [email protected] += 0x02
return

:PLAYBACK_CHECKBYTEREADINGERROR
0019:   [email protected] > 127
jf @PLAYBACK_CHECKBYTEREADINGERROR_RETURN
000E: [email protected] -= 256

:PLAYBACK_CHECKBYTEREADINGERROR_RETURN
return

:PLAYBACK_APPLYZERO
0A8C: write_memory [email protected] size 4 value 0.0 virtual_protect 1
000A: [email protected] += 0x02
return

 

 

 

 

Edited by Shagg_E

Share this post


Link to post
Share on other sites
JohnsonHu
Posted (edited)

So is it possible to use the exact same code for another recording but with different vehicles and actors?

Edited by JohnsonHu

Share this post


Link to post
Share on other sites
Shagg_E

Yes. Every SCM function may be called countless times for different vehicles. "CarRec2CarsScene" is the finest and simplest example of that.

Share this post


Link to post
Share on other sites
JohnsonHu
Posted (edited)

Hello i just used this code example for my recordings (i recorded two banshees racing and when i load it 

The scene loads the actor loads but the game counts down from 3 to 1 and but it will crash after it counts to two and it keeps giving me :

 

Unhandled exeption

 

at address 00652d8b

 Why does it do that i dont know ?

 

 

Edited by JohnsonHu

Share this post


Link to post
Share on other sites
Shagg_E

It means the game can't find the file. Have you changed file names in "CARRECORD_READCR" SCM function?

Share this post


Link to post
Share on other sites
JohnsonHu

No i just renamed them to their actual names that are listed in the "CARRECORD_READCR"

Share this post


Link to post
Share on other sites
Shagg_E
Posted (edited)

Check if you selected "As is" in Sanny Builder's "Tools/Options/Formats/Case converting/".
If you did it, and after recompiling you still has this problem - send me those files and your script(if you changed it) here or in PM, I'll check them.

Edited by Shagg_E

Share this post


Link to post
Share on other sites
JohnsonHu

It worked! 

The playback/recording worked fine and amazing but,it seem to be ending much shorter than what i recorded because the first recording is 50secs and the second is 60 secs but they end in the exact same time but shorter like 26 secs no matter how long i recored them

Share this post


Link to post
Share on other sites
Shagg_E
Posted (edited)

It's probably because of timer check. Change it.

Edited by Shagg_E

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.