But when I try to put it inside the functions it will give an error saying that the HITFLESH variable is undefined.
Bottom line, is there no way to play a sound inside of a functions?
Function DamOrKill(Float Damage, Actor Target, Actor Attacker) globalif Damage >= 1Sound Property HitFlesh Auto ; I have tired to define this var both here and outside the function.HitFlesh.play(target)endifendFunction
This also will not work if I define the HitFlesh variable at the top of the script (outside of the function).
