Posted: Fri Apr 29, 2016 9:48 am Post subject: Sound Alerts - need help
So I want a message box, a warning sound is more preferred, to pop up when my health decreases to a certain level, for example 20 or lower. I found the address with cheat engine, now how can i associate this address to a script, by getting the value from the specified adress check if the value is below 20, and if it is, the computer will beep. Any help with this, preferibally a written code, i tried to do it i have very basic coding skills and I wasn't capable. Any help apreiciated. Please give instructions on how to write this if you can
createTimer().OnTimer = function(timer)
if readInteger(0x003E0000) < 20 then beep() end
end
If you don't want it to continuously beep, declare a boolean within the scope of the timer and use that in the if statement. For example, set it to false when you play the beep sound and set it to true when your health is above 20.
For testing purposes, I'd recommend assigning the table returned by the function createTimer to some global variable so you can enable/disable/destroy it at will.
If you want to also display a message box, look into the messageDialog function in main.lua. _________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum