if ( GetSoundPlaying "ghostgate sound" == 0 ) playloopsound3dvp "ghostgate sound" 1.0 1.0 endif
scn PCHitTestbegin GameModeshort soundplayedfloat fuzzyCheckRadiusif ( getSoundPlaying "WPNHitBladeFlesh" == 1 ) if ( fuzzyCheckRadius <= 30 ) set soundplayed to 1if ( getSoundPlaying "WPNHitBladeFleshX" == 1 ) if ( fuzzyCheckRadius <= 30 ) set soundplayed to 1;if ( getSoundPlaying "wpnhitbladeflesh03" == 1 ); set soundplayed to 1;if ( getSoundPlaying "wpn_hit_bladeflesh_04" == 1 ); set soundplayed to 1 endif endifendifendif;endif;endif if ( soundPlayed == 1 ) MessageBox "Working", "Ok" set soundplayed to 0 endifend
scn PCHitTestshort soundplayedbegin GameMode if ( player.getSoundPlaying "WPNHitBladeFlesh" 35 || player.getSoundPlaying "WPNHitBladeFleshX" 35 ) set soundplayed to 1 endif if ( soundPlayed == 1 ) MessageBox "Working", "Ok" set soundplayed to 0 endif endYou cannot declare variables inside script blocks. Variables in ObScript are anologous to global variables in programming languages - They have global scope in the script they are declared in.