Simba Code:
program HealthWarning;
{$i AeroLib/AeroLib.Simba}
const
WarnWhenHealth = 20; //Warning sound when at or below this value
begin
InitAL;
repeat
if getCurrentHealth <= WarnWhenHealth then
begin
PlaySound('C:\Simba\CalmWarning.wav');
while getCurrentHealth <= WarnWhenHealth do
Wait(100);
end;
Wait(100);
until(false);
end.
You'll need Aerolib for that to work. Search the forum for it's thread and download the required files.
Download the below attachment, extract it in C:\Simba. If you have installed simba elsewhere, then update the path in the above code to match your install path.