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

    1. GTANet.com

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    1. Announcements

    2. Support

    3. Suggestions

deltaCJ

[SA] Cutscene Dialogue

Recommended Posts

deltaCJ

Okay, I'm sorry for making a lot of posts, but its like almost everyday I have a question. I hope papa ZAZ can solve my question, but I went through a popular GTA SA Mod SCM to see what opcodes I can take and make use of, like i learned the helicopter_fly to opcode from reading the original main.scm, but I saw these lines that had me questioning.

 

These:

05A9: s$ACTOR_SPEECH_GXT_REFERENCE = '[email protected]' // s$  // ~z~Hey Carl.04AE: $ACTOR_SPEECH_WAV_FILE = 5000 // = constant 004F: create_thread @AUDIOL $PLAYER_ACTOR 0 1 1 0 

It seems to me that it loads a speech file and creates a thread right? pretty self explanatory right?

 

So i put it in a custom scm script I made,

but it doesn't work? no .wav file is loaded, and IDK what happens in the @AUDIOL thread.

 

if i do the CTRL + NUM_2

 

I go to these threads:

:AUDIOL03A4: name_thread 'AUDIOL' 0006: [email protected] = 0 00D6: if 0039:   [email protected] == -1 004D: jump_if_false @AUDIOL_60 009A: [email protected] = create_actor_pedtype 4 model #MALE01 at 0.0 0.0 0.0 :AUDIOL_6000D6: if 8038:   not  $AUDIO_LINE_IS_ACTIVE == 0 004D: jump_if_false @AUDIOL_169 00D6: if 0039:   [email protected] == 1 004D: jump_if_false @AUDIOL_162 040D: unload_wav [email protected] :AUDIOL_10100D6: if 8038:   not  $AUDIO_LINE_IS_ACTIVE == 0 004D: jump_if_false @AUDIOL_155 00D6: if 0038:   $1035 == 1 004D: jump_if_false @AUDIOL_144 0002: jump @AUDIOL_737 :AUDIOL_1440001: wait 0 ms 0002: jump @AUDIOL_101 :AUDIOL_1550002: jump @AUDIOL_169 :AUDIOL_1620002: jump @AUDIOL_737 :AUDIOL_16905AA: [email protected] = s$ACTOR_SPEECH_GXT_REFERENCE // @s = 'short' 008B: [email protected] = $ACTOR_SPEECH_WAV_FILE // (int) 0004: $AUDIO_LINE_IS_ACTIVE = 1 :AUDIOL_19200D6: if 0038:   $1035 == 1 004D: jump_if_false @AUDIOL_217 0002: jump @AUDIOL_662 :AUDIOL_2170871: init_jump_table [email protected] total_jumps 4 default_jump 0 @AUDIOL_651 jumps 0 @AUDIOL_280 1 @AUDIOL_362 2 @AUDIOL_531 3 @AUDIOL_637 -1 @AUDIOL_651 -1 @AUDIOL_651 -1 @AUDIOL_651 :AUDIOL_28000D6: if 0039:   [email protected] == 0 004D: jump_if_false @AUDIOL_311 040D: unload_wav [email protected] 03CF: load_wav [email protected] as [email protected] :AUDIOL_31100D6: if 8118:   not actor [email protected] dead 004D: jump_if_false @AUDIOL_341 094E: set_actor [email protected] mute_pain_audio 1 0A09: set_actor [email protected] muted 1 // versionB :AUDIOL_3410006: [email protected] = 0 000A: [email protected] += 1 0002: jump @AUDIOL_651 :AUDIOL_36200D6: if 03D0:   wav [email protected] loaded 004D: jump_if_false @AUDIOL_498 00D6: if 8118:   not actor [email protected] dead 004D: jump_if_false @AUDIOL_444 00D6: if 894D:   not actor [email protected] mutally_active 004D: jump_if_false @AUDIOL_436 00D6: if 0039:   [email protected] == 1 004D: jump_if_false @AUDIOL_436 0949: link_wav [email protected] to_actor [email protected] :AUDIOL_4360967: actor [email protected] move_mouth 10000 ms :AUDIOL_44403D1: play_wav [email protected] 00D6: if 85AE:   not  [email protected] == 'DUMMY' // @s == 'short' 004D: jump_if_false @AUDIOL_484 00BC: show_text_highpriority GXT [email protected] time 10000 flag 1 :AUDIOL_484000A: [email protected] += 1 0002: jump @AUDIOL_524 :AUDIOL_49800D6: if 0019:   [email protected] > 5000 004D: jump_if_false @AUDIOL_524 000A: [email protected] += 1 :AUDIOL_5240002: jump @AUDIOL_651 :AUDIOL_53100D6: if 03D0:   wav [email protected] loaded 004D: jump_if_false @AUDIOL_623 00D6: if 03D2:   wav [email protected] ended 004D: jump_if_false @AUDIOL_577 000A: [email protected] += 1 0002: jump @AUDIOL_616 :AUDIOL_57700D6: if 056D:   actor [email protected] defined 004D: jump_if_false @AUDIOL_616 00D6: if 0118:   actor [email protected] dead 004D: jump_if_false @AUDIOL_616 000A: [email protected] += 1 :AUDIOL_6160002: jump @AUDIOL_630 :AUDIOL_623000A: [email protected] += 1 :AUDIOL_6300002: jump @AUDIOL_651 :AUDIOL_6370002: jump @AUDIOL_662 0002: jump @AUDIOL_651 :AUDIOL_6510001: wait 0 ms 0002: jump @AUDIOL_192 :AUDIOL_66200D6: if 8118:   not actor [email protected] dead 004D: jump_if_false @AUDIOL_695 094F: enable_actor [email protected] pain_audio 0A09: set_actor [email protected] muted 0 // versionB 0968: actor [email protected] stop_mouth :AUDIOL_695040D: unload_wav [email protected] 00D6: if 85AE:   not  [email protected] == 'DUMMY' // @s == 'short' 004D: jump_if_false @AUDIOL_730 03D5: remove_text [email protected] :AUDIOL_7300004: $AUDIO_LINE_IS_ACTIVE = 0 :AUDIOL_737004E: end_thread

And these threads are created everytime the dialogue starts.

 

EVERY time an actor starts to talk, this thread is created. Crazy right?

 

Can someone explain this to me so I could use this in my code? Thanks :)

Share this post


Link to post
Share on other sites
ZAZ

Okay, I'm sorry for making a lot of posts, but its like almost everyday I have a question. I hope papa ZAZ can solve my question, but I went through a popular GTA SA Mod SCM to see what opcodes I can take and make use of, like i learned the helicopter_fly to opcode from reading the original main.scm, but I saw these lines that had me questioning.

 

These:

05A9: s$ACTOR_SPEECH_GXT_REFERENCE = '[email protected]' // s$ // ~z~Hey Carl.04AE: $ACTOR_SPEECH_WAV_FILE = 5000 // = constant 004F: create_thread @AUDIOL $PLAYER_ACTOR 0 1 1 0 
It seems to me that it loads a speech file and creates a thread right? pretty self explanatory right?

 

So i put it in a custom scm script I made,

but it doesn't work? no .wav file is loaded, and IDK what happens in the @AUDIOL thread.

 

if i do the CTRL + NUM_2

 

I go to these threads:

 

And these threads are created everytime the dialogue starts.

 

EVERY time an actor starts to talk, this thread is created. Crazy right?

 

Can someone explain this to me so I could use this in my code? Thanks :)

 

Yes, you're right.

But your string looks invalid:

'[email protected]'

 

 

s$ACTOR_SPEECH_GXT_REFERENCE gives the gxt id by using a GLOBAL string var

and $ACTOR_SPEECH_WAV_FILE gives the audio id by using a GLOBAL var

 

004F: create_thread @AUDIOL $PLAYER_ACTOR 0 1 1 0 starts the AUDIOL thread ..

.. with parameters

to manage gxt and audio, especially audio

 

s$ACTOR_SPEECH_GXT_REFERENCE and $ACTOR_SPEECH_WAV_FILE will be changed into local vars

05AA: [email protected] = s$ACTOR_SPEECH_GXT_REFERENCE // @s = 'short'008B: [email protected] = $ACTOR_SPEECH_WAV_FILE // (int)

this method isn't required but can make sense for some cases

 

Ok, now i explain what create_thread .. with parameters means

 

you can attach up to 30 parameters to the create_thread command

example:

004F: create_thread @mythread 1 2 0 [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

The started thread recieves these parameter values by following rule

[email protected] get value of 1.parameter

[email protected] get value of 2.parameter

[email protected] get value of 3.parameter

[email protected] get value of 4.parameter

[email protected] get value of 5.parameter

and so on

 

(same for cleo equivalent 0A92: create_custom_thread,

as well as for 0913: run_external_script 26 (GF_SEX) $GIRLFRIEND 1 [email protected] [email protected] [email protected] [email protected] [email protected])

 

Let's look now what your cammand does

004F: create_thread @AUDIOL $PLAYER_ACTOR 0 1 1 0

[email protected] = $PLAYER_ACTOR

[email protected] = 0

[email protected] = 1

[email protected] = 1

[email protected] = 0

 

 

this create actor code will be skiped

0006: [email protected] = 000D6: if0039:   [email protected] == -1004D: jump_if_false @AUDIOL_60009A: [email protected] = create_actor_pedtype 4 model #MALE01 at 0.0 0.0 0.0:AUDIOL_60

so here, [email protected] will be $PLAYER_ACTOR

 

:AUDIOL_31100D6: if8118:   not actor [email protected] dead004D: jump_if_false @AUDIOL_341094E: set_actor [email protected] mute_pain_audio 10A09: set_actor [email protected] muted 1 // versionB:AUDIOL_31100D6: if8118:   not actor $PLAYER_ACTOR dead004D: jump_if_false @AUDIOL_341094E: set_actor $PLAYER_ACTOR mute_pain_audio 10A09: set_actor $PLAYER_ACTOR muted 1 // versionB

here also

 

00D6: if8118:   not actor [email protected] dead004D: jump_if_false @AUDIOL_44400D6: if894D:   not actor [email protected] mutally_active004D: jump_if_false @AUDIOL_43600D6: if0039:   [email protected] == 1004D: jump_if_false @AUDIOL_4360949: link_wav [email protected] to_actor [email protected]:AUDIOL_4360967: actor [email protected] move_mouth 10000 ms

and here

:AUDIOL_66200D6: if8118:   not actor [email protected] dead004D: jump_if_false @AUDIOL_695094F: enable_actor [email protected] pain_audio0A09: set_actor [email protected] muted 0 // versionB0968: actor [email protected] stop_mouth

[email protected] = 0

we can find [email protected] only here

00D6: if0039:   [email protected] == 1004D: jump_if_false @AUDIOL_4360949: link_wav [email protected] to_actor [email protected]

so the wav won't be linked to $PLAYER_ACTOR

you should change this parameter to 1

it will be louder if the wav is linked to actor

 

[email protected] = 1

we can find [email protected] only here

00D6: if0039:   [email protected] == 1004D: jump_if_false @AUDIOL_162040D: unload_wav [email protected]

this isn't important, it's a usal method in gta audio scripting, that you unload the wav slot before loading a new one,

because maybe there's already stored a wav in memory and you want avoid that it will be played

 

 

[email protected] = 1

[email protected] = wav slot

wav slot = 1

03CF: load_wav [email protected] as [email protected]

remember: [email protected] = $ACTOR_SPEECH_WAV_FILE

so, the wav file id be be loaded at wav slot 1

(wav slot 1 is ok, but sometimes problems can be fixed by changing wav slot, then maybe playing around with wav slot 1, 2, 3)

 

 

[email protected] = 0

we can find [email protected] only here

:AUDIOL_28000D6: if0039:   [email protected] == 0004D: jump_if_false @AUDIOL_311040D: unload_wav [email protected]: load_wav [email protected] as [email protected]

so [email protected] must be 0, otherwise the given audio won't be loaded

 

 

How the script works:

At beginning are some code blocks with checks for $AUDIO_LINE_IS_ACTIVE

This should avoid multiple thread starts, so that the thread can only run in one instance.

 

then this

 

05AA: [email protected] = s$ACTOR_SPEECH_GXT_REFERENCE // @s = 'short'008B: [email protected] = $ACTOR_SPEECH_WAV_FILE // (int)0004: $AUDIO_LINE_IS_ACTIVE = 1

then there's a check for $1035

$1035 changes inside thread 'CLEANAU'

thread 'CLEANAU' resets $AUDIO_LINE_IS_ACTIVE

it's something like a cleanup method after mission dialoques

 

 

then there's a jump table

this jump table manages the main sequences

0871: init_jump_table [email protected] total_jumps 4 default_jump 0 @AUDIOL_651 jumps 0 @AUDIOL_280 1 @AUDIOL_362 2 @AUDIOL_531 3 @AUDIOL_637 -1 @AUDIOL_651 -1 @AUDIOL_651 -1 @AUDIOL_651

the code jumps first to AUDIOL_280, because [email protected] = 0 at beginning

then to AUDIOL_362, then to AUDIOL_531, then to AUDIOL_637

 

:AUDIOL_28000D6: if0039:   [email protected] == 0004D: jump_if_false @AUDIOL_311040D: unload_wav [email protected]: load_wav [email protected] as [email protected]:AUDIOL_31100D6: if8118:   not actor [email protected] dead004D: jump_if_false @AUDIOL_341094E: set_actor [email protected] mute_pain_audio 10A09: set_actor [email protected] muted 1 // versionB:AUDIOL_3410006: [email protected] = 0000A: [email protected] += 1            <<<----         [email protected] changes to 10002: jump @AUDIOL_651

 

 

 

 

 

:AUDIOL_36200D6: if03D0:   wav [email protected] loaded004D: jump_if_false @AUDIOL_49800D6: if8118:   not actor [email protected] dead004D: jump_if_false @AUDIOL_44400D6: if894D:   not actor [email protected] mutally_active004D: jump_if_false @AUDIOL_43600D6: if0039:   [email protected] == 1004D: jump_if_false @AUDIOL_4360949: link_wav [email protected] to_actor [email protected]:AUDIOL_4360967: actor [email protected] move_mouth 10000 ms:AUDIOL_44403D1: play_wav [email protected]: if85AE:   not  [email protected] == 'DUMMY' // @s == 'short'004D: jump_if_false @AUDIOL_48400BC: show_text_highpriority GXT [email protected] time 10000 flag 1:AUDIOL_484000A: [email protected] += 10002: jump @AUDIOL_524:AUDIOL_49800D6: if0019:   [email protected] > 5000004D: jump_if_false @AUDIOL_524000A: [email protected] += 1          <<<----  [email protected] changes to 2:AUDIOL_5240002: jump @AUDIOL_651

 

 

 

:AUDIOL_53100D6: if03D0:   wav [email protected] loaded004D: jump_if_false @AUDIOL_62300D6: if03D2:   wav [email protected] ended004D: jump_if_false @AUDIOL_577000A: [email protected] += 10002: jump @AUDIOL_616:AUDIOL_57700D6: if056D:   actor [email protected] defined004D: jump_if_false @AUDIOL_61600D6: if0118:   actor [email protected] dead004D: jump_if_false @AUDIOL_616000A: [email protected] += 1:AUDIOL_6160002: jump @AUDIOL_630:AUDIOL_623000A: [email protected] += 1         <<<----  [email protected] changes to 3:AUDIOL_6300002: jump @AUDIOL_651

at the end of each block it jumps to AUDIOL_651

 

 

:AUDIOL_6370002: jump @AUDIOL_6620002: jump @AUDIOL_651:AUDIOL_651     <<<<---- here is AUDIOL_6510001: wait 0 ms0002: jump @AUDIOL_192 <<<<---- and here it jumps up to loop adress:AUDIOL_66200D6: if8118:   not actor [email protected] dead004D: jump_if_false @AUDIOL_695094F: enable_actor [email protected] pain_audio0A09: set_actor [email protected] muted 0 // versionB0968: actor [email protected] stop_mouth:AUDIOL_695040D: unload_wav [email protected]: if85AE:   not  [email protected] == 'DUMMY' // @s == 'short'004D: jump_if_false @AUDIOL_73003D5: remove_text [email protected]:AUDIOL_7300004: $AUDIO_LINE_IS_ACTIVE = 0:AUDIOL_737004E: end_thread

Share this post


Link to post
Share on other sites
deltaCJ

Thanks ZAZ what would we do without you <3

 

P.S. Where would I be able to get .WAV id's?

Edited by deltaCJ

Share this post


Link to post
Share on other sites
deltaCJ

@ZAZ A new problem has risen...

 

https://pastebin.com/2wHU0vAe  <============== Script Paste

 

Using the @AUDIOL and the @CLEANAU scripts brings up the text for a few seconds, but then disappears. 

No sounds, just text. the opcode it looks like: create_thread @AUDIOL $PLAYER ACTOR 1 1 1 0 

(Made sure it is tied to actor, and it doesn't get unloaded automatically)

 

*Note I did use custom GXT Entry BUT I did NOT mess with SFX sounds at all, not even by modloader.

 

What could be the problem? 

 

 

 

Share this post


Link to post
Share on other sites
ZAZ

The Remington stucks at the bridge (i'm wondering that you can't see that, i recommand to test it on unmodded game, no cleo, no any other script mods or asi files)

so CJ can't arrive at 2351.003 -1477.97 23.9533

to pass this check

if
00FE:   actor [email protected] sphere 0 in_sphere 2351.003 -1477.97 23.9533 radius 15.0 15.0 15.0
else_jump @INTRO_464

 

 

just deactivate it and add a wait instead to test it

wait 3000 
:INTRO_464
wait 0
//if
//00FE:   actor 1@ sphere 0 in_sphere 2351.003 -1477.97 23.9533 radius 15.0 15.0 15.0
//else_jump @INTRO_464

 

 

 

_____

edit

 

The Remington stucks for me at the bridge, maybe because of the assigned path

did you have a custom path?

 

07C0: load_path 1

 

However, the sound for the phone call was working for me ("who the f*ck is this ....")

 

text was not shown because 'INTAM' and 'INTAN' don't exist

 

 

 

 

 

 

Edited by ZAZ
  • Like 1

Share this post


Link to post
Share on other sites
deltaCJ

Sorry, forgot to mention, yes I had a custom car path and the exact coordinates in finishes it checks to see if the player was there.

 

The audio still does not show up but the text does, I'm going to try on a fresh install

 

EDIT: Does not work with Fresh Install either.

 

Maybe it is the audio files... since it works with you and not for me.

 

EDIT2: It was indeed the SFX and stream files haha, quick reinstall fixed it :D thanks zaz! Your comment still helped, I decided to fix the car on the bridge just in case that would happen to anyone else (if the car doesn't have a path and/or it doesn't exist, automatically jump to end of cutscene)

 

 

Edited by deltaCJ

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.