
Originally Posted by
fireeater67
First, I believe that the max volume is 1, not 100.
Second, that code should pretty much work, though for HP I would use < 1
and for the alive just do
Code:
@persist O:entity Alive
if(first()){O = owner()}
Alive = O:isAlive()
if(changed(Alive) & ! Alive){ sound code here } That's correct. However, I don't see the point of having "O" in there as you are only using owner once. You also forgot interval.
Fix:
Code:
interval(10)
Alive = owner():isAlive()
if (changed(Alive) & !Alive) {
owner():soundPlay(1,0,"leftfordeath.wav")
}
Bookmarks