Clotting in Mush?

by Malagar

Back to Mechanic's Corner.

Malagar2011-08-11 02:17:40
I'm trying to develop a trigger for Mush that has me clot if I bleed over a certain amount of health (I think upwards of 40 is good for me at this very moment). I don't know how to make it work though, and right now, I'm just clotting everytime I bleed, which will definately end up a waste of resources. What I have is a trigger ] >> clot

Any pointers?
Rivius2011-08-11 13:35:30
The simplest thing you could do is this:

CODE
local bleeding = tonumber("%1")
if bleeding > 40 then
for i = 1, (math.min((bleeding/20), 15)) do
Send("clot")
end


Make sure to "Send to script".

The 15 in that script is the limit to how many times you'll clot, since I figure you don't want to spam your client to hell if you're bleeding bucketloads.


There's better ways to do this though that would account for your bleeding a lot better, but that would require at least one more trigger and a few functions in your script file.

Edit: Fixed some derp mistakes