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. PC
      2. Gameplay
      3. Missions
      4. 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. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    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

Sign in to follow this  
xelono

(HELP) Cleo with object and sound does not work well

Recommended Posts

xelono
I have a CLEO that makes an "object x" from an .img file. At the moment of playing, it appears in the indicated place, it also reproduces a "sound x" that I chose as the default.
The problem is that it no longer works well, when I approach the object it disappears. I have another 2 CLEO with the same function but only 1 works correctly. (previously the three CLEOs worked very well) this happened after changing the coordinate of the position of the object.
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013{$CLEO .cs}//-------------MAIN---------------0000: NOP thread "VOICE2" :VOICE2_GTA_34wait 0 if    Player.Defined($PLAYER_CHAR)else_jump @VOICE2_GTA_34 if    Player.Defined($PLAYER_CHAR)else_jump @VOICE2_GTA_34 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 240.77 -2292.63 51.02 radius 200.0 200.0 200.0 else_jump @VOICE2_GTA_34 wait 0 else_jump @VOICE2_GTA_34 :VOICE2_GTA_125wait 0 $VO2 = Audiostream.Load3D("CLEO/SOUNDS/VOICE2.MP3")else_jump @VOICE2_GTA_125 wait 0 038B: load_requested_models else_jump @VOICE2_GTA_125 wait 0 else_jump @VOICE2_GTA_34 $TEMPO2 = 100 wait $TEMPO2 else_jump @VOICE2_GTA_34 $CASETOFON2 = Object.Create(19335, 240.77, -2292.63, 49.47)Object.Angle($CASETOFON2) = 0.0Audiostream.LinkToObject($VO2, $CASETOFON2)Audiostream.PerformAction($VO2, PLAY)Audiostream.Loop($VO2, 1)wait 1000 :VOICE2_GTA_271wait 0 if 80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 240.77 -2292.63 49.47 radius 200.0 200.0 200.0 else_jump @VOICE2_GTA_271 Audiostream.Release($VO2)else_jump @VOICE2_GTA_271 wait 500 else_jump @VOICE2_GTA_271 wait 500 Object.Destroy($CASETOFON2)else_jump @VOICE2_GTA_271 wait 1000 jump @VOICE2_GTA_34 

This works very well:

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013{$CLEO .cs}//-------------MAIN---------------0000: NOP thread "VOICE1" :VOICE1_GTA_34wait 0 if    Player.Defined($PLAYER_CHAR)else_jump @VOICE1_GTA_34 if    Player.Defined($PLAYER_CHAR)else_jump @VOICE1_GTA_34 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 683.32 -2240.05 55.9019 radius 200.0 200.0 200.0 else_jump @VOICE1_GTA_34 wait 0 else_jump @VOICE1_GTA_34 :VOICE1_GTA_125wait 0 $VO1 = Audiostream.Load3D("CLEO/SOUNDS/VOICE1.MP3")else_jump @VOICE1_GTA_125 wait 0 038B: load_requested_models else_jump @VOICE1_GTA_125 wait 0 else_jump @VOICE1_GTA_34 $TEMPO1 = 100 wait $TEMPO1 else_jump @VOICE1_GTA_34 $CASETOFON1 = Object.Create(19287, 683.32, -2240.05, 55.185)Object.Angle($CASETOFON1) = 0.0Audiostream.LinkToObject($VO1, $CASETOFON1)Audiostream.PerformAction($VO1, PLAY)Audiostream.Loop($VO1, 1)wait 1000 :VOICE1_GTA_271wait 0 if 80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 683.32 -2240.05 55.9019 radius 200.0 200.0 200.0 else_jump @VOICE1_GTA_271 Audiostream.Release($VO1)else_jump @VOICE1_GTA_271 wait 500 else_jump @VOICE1_GTA_271 wait 500 Object.Destroy($CASETOFON1)else_jump @VOICE1_GTA_271 wait 1000 jump @VOICE1_GTA_34 

HELP ME PLEASE!!

Share this post


Link to post
Share on other sites
guard3

When you have trouble with scripting, it's best to use the dedicated coding section; you have higher chance of finding help there ;)

http://gtaforums.com/forum/317-coding/

Share this post


Link to post
Share on other sites
GuruGuru

Probably it's because you are using global variables, or just because you coded it wrong.

 

Since I was too lazy to debug your code I recreated it.

 

 

 

SCRIPT_STARTNOP{    CONST_INT OBJ_MODEL 969    LVAR_INT scplayer sound1 obj    GET_PLAYER_CHAR (0) (scplayer)    main:    LOAD_3D_AUDIO_STREAM ("cleo/sounds/sound1.mp3", sound1)    REQUEST_MODEL OBJ_MODEL    WHILE NOT HAS_MODEL_LOADED OBJ_MODEL        WAIT (0)    ENDWHILE    WHILE IS_PC_VERSION        WAIT 0        WHILE NOT IS_PLAYER_PLAYING (scplayer)            WAIT (0)        ENDWHILE        WHILE NOT LOCATE_CHAR_ANY_MEANS_3D (scplayer,  683.32, -2240.05, 55.9019, 200.0, 200.0, 200.0, FALSE)            WAIT (0)        ENDWHILE        CREATE_OBJECT_NO_OFFSET (OBJ_MODEL, 683.32, -2240.05, 55.185) (obj)        SET_OBJECT_HEADING (obj, 0.0)        SET_PLAY_3D_AUDIO_STREAM_AT_OBJECT (sound1, obj)        SET_AUDIO_STREAM_STATE (sound1, 1)        SET_AUDIO_STREAM_LOOPED (sound1, TRUE)        WHILE LOCATE_CHAR_ANY_MEANS_3D (scplayer,  683.32, -2240.05, 55.9019, 200.0, 200.0, 200.0, FALSE)            WAIT (0)        ENDWHILE        SET_AUDIO_STREAM_STATE (sound1, 0)        DELETE_OBJECT (obj)    ENDWHILE}SCRIPT_END 

 

 

 

It's written in GTA3sc but you can easily translate it to Sanny by yourself.

Oh and don't forget to use local variables.

Edited by guru_guru

Share this post


Link to post
Share on other sites
xelono

Probably it's because you are using global variables, or just because you coded it wrong.

 

Since I was too lazy to debug your code I recreated it.

 

 

 

SCRIPT_STARTNOP{    CONST_INT OBJ_MODEL 969    LVAR_INT scplayer sound1 obj    GET_PLAYER_CHAR (0) (scplayer)    main:    LOAD_3D_AUDIO_STREAM ("cleo/sounds/sound1.mp3", sound1)    REQUEST_MODEL OBJ_MODEL    WHILE NOT HAS_MODEL_LOADED OBJ_MODEL        WAIT (0)    ENDWHILE    WHILE IS_PC_VERSION        WAIT 0        WHILE NOT IS_PLAYER_PLAYING (scplayer)            WAIT (0)        ENDWHILE        WHILE NOT LOCATE_CHAR_ANY_MEANS_3D (scplayer,  683.32, -2240.05, 55.9019, 200.0, 200.0, 200.0, FALSE)            WAIT (0)        ENDWHILE        CREATE_OBJECT_NO_OFFSET (OBJ_MODEL, 683.32, -2240.05, 55.185) (obj)        SET_OBJECT_HEADING (obj, 0.0)        SET_PLAY_3D_AUDIO_STREAM_AT_OBJECT (sound1, obj)        SET_AUDIO_STREAM_STATE (sound1, 1)        SET_AUDIO_STREAM_LOOPED (sound1, TRUE)        WHILE LOCATE_CHAR_ANY_MEANS_3D (scplayer,  683.32, -2240.05, 55.9019, 200.0, 200.0, 200.0, FALSE)            WAIT (0)        ENDWHILE        SET_AUDIO_STREAM_STATE (sound1, 0)        DELETE_OBJECT (obj)    ENDWHILE}SCRIPT_END 

 

 

 

It's written in GTA3sc but you can easily translate it to Sanny by yourself.

Oh and don't forget to use local variables.

 

Hola gururu,

 

Oye me podrías orientar con el tema de GTA3sc?? es como un compilador de .scm?? osea, por el cual es posible crear códigos de misiones, etc tipo cleo? es primera vez que leo sobre este programa.

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.

Sign in to follow this  

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