Thanks Uman. I tried something. I couldnt understand the 3dsound command and how to use it but tried to customize the decal.fpi script and repeatsound.fpi. Here is the snippet. Can you or someone check it for me please and tell me where I am going wrong?
Decal.fpi
;Artificial Intelligence Script
; 0-once face player
; 1-once keep angle
; 2-loop face player
; 3-loop keep angle
; 4-once face up
; 5-loop face up
; 6-character-spot-decal (at end of entity characters gun if available)
;Header
desc = Runs Decal Loop
;Triggers
:state=0:state=1
:state=1,plrdistwithin=200:rundecal=2,state=2
:state=2,plrdistfurther=201:setalphafade=0,state=1
;End of Script
Sound.fpi
;Artificial Intelligence Script
;Header
desc = Sound loop and appear instantly
;Triggers
:state=0,plrdistwithin=200:loopsound=$0,setalphafade=100,runfpidefault=1,state=1
:state=1,plrdistfurther=201:loopsound=$0,setalphafade=0,runfpidefault=1,state=1
;End of Script
Thanks