Ezekiel Posted November 18, 2015 Share Posted November 18, 2015 (edited) What I want is Sound to be Heard around my spawned ped in cleo which doing animation Can Someone compile this with my script,Am Ultra Noob With scripting in Cleo 00A4: actor $PLAYER_ACTOR sphere 0 in_cube_cornerA 308.5 -1816 0 cornerB 319.5 -1806 300AAD: set_mp3 $7 perform_action 10AC0: audiostream $7 loop 1 Clean Script: //-------------MAIN---------------03A4: name_thread 'SPACANM'0AAC: $7 = load_audiostream "CLEO\SOUNDS\MUSIC.MP3":SPACANM_390001: wait 0 ms00D6: if0256: player $PLAYER_CHAR defined004D: jump_if_false @SPACANM_43400BF: [email protected] = current_time_hours, [email protected] = current_time_minutes00D6: if and0029: [email protected] >= 6001B: 20 > [email protected]: jump_if_false @SPACANM_41900D6: if00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 315.364 -1811.82 6.76562 radius 100.5 100.5 100.5004D: jump_if_false @SPACANM_525:SPACANM_1400001: wait 0 ms0247: load_model #BFYST0248: model #BFYST available004D: jump_if_false @SPACANM_140009A: [email protected] = create_actor_pedtype 2 model #BFYST at 315.364 -1811.82 6.765620249: release_model #BFYST:SPACANM_1870001: wait 0 ms04ED: load_animation "park"04EE: animation "park" loaded004D: jump_if_false @SPACANM_1870812: AS_actor [email protected] perform_animation "tai_chi_in" IFP "park" framedelta 1.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB0002: jump @SPACANM_356:SPACANM_25900BF: [email protected] = current_time_hours, [email protected] = current_time_minutes00D6: if and0256: player $PLAYER_CHAR defined0029: [email protected] >= 6001B: 20 > [email protected]: jump_if_false @SPACANM_4340001: wait 0 ms00D6: if80FE: not actor $PLAYER_ACTOR sphere 0 in_sphere 315.364 -1811.82 6.76562 radius 100.5 100.5 100.5004D: jump_if_false @SPACANM_3560002: jump @SPACANM_434:SPACANM_35600D6: if051A: actor [email protected] damaged_by_actor $PLAYER_ACTOR004D: jump_if_false @SPACANM_4120792: disembark_instantly_actor [email protected]: set_actor [email protected] health_to 200AAE: release_mp3 $704EF: release_animation "park"01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @SPACANM_518:SPACANM_4120002: jump @SPACANM_259:SPACANM_41904EF: release_animation "park"0002: jump @SPACANM_447:SPACANM_43404EF: release_animation "park"01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian:SPACANM_4470256: player $PLAYER_CHAR defined004D: jump_if_false @SPACANM_5250001: wait 0 ms00D6: if80FE: not actor $PLAYER_ACTOR sphere 0 in_sphere 315.364 -1811.82 6.76562 radius 100.5 100.5 100.5004D: jump_if_false @SPACANM_5180002: jump @SPACANM_525:SPACANM_5180002: jump @SPACANM_434:SPACANM_5250002: jump @SPACANM_39 Here Script with Sound http://www.mediafire.com/download/3oo1nrmoqshrbhn/Cleo_Help.rar This is not so simple,because I have died trying,is it even possible to add it in this messy script Idea for Script was Thank you for your time! Edited November 18, 2015 by Ezekiel cosmys 1 Link to comment Share on other sites More sharing options...
goodidea82 Posted November 19, 2015 Share Posted November 19, 2015 (edited) Using the global variable $7 is not save. In main.scm I see statements like: 0059: $7 += $9 // (float) 00D6: if 0030: $7 >= 170.0 004D: jump_if_false @GYMTREA_5243 000D: $7 -= 170.0 0653: $GYM_STAT_Fat = float_stat 21 00D6: if Try using a local variable. Edited November 19, 2015 by goodidea82 Link to comment Share on other sites More sharing options...
spaceeinstein Posted November 20, 2015 Share Posted November 20, 2015 (edited) You could at least try to bash out some code. You found the necessary lines to add: 03A4: name_thread 'SPACANM'0AAC: [email protected] = load_audiostream "CLEO\SOUNDS\MUSIC.MP3"0AC0: set audio stream loop//...:SPACANM_412if 00A4: player in areathen 0AAD: resume audio streamelse 0AAD: pause audio streamendOr if you prefer the low-level way, you have existing code on which you can base your new code: 03A4: name_thread 'SPACANM'0AAC: [email protected] = load_audiostream "CLEO\SOUNDS\MUSIC.MP3"0AC0: set audio stream loop//...:SPACANM_412if 00A4: player in areajump_if_false @pause_audio0AAD: resume audio streamjump @end:pause_audio0AAD: pause audio stream:end Edited November 20, 2015 by spaceeinstein Ezekiel and RyanDri3957V 2 Link to comment Share on other sites More sharing options...
Recommended Posts