Hey, this is nice

:
Three possible solutions in 4 hours. Thanks!!
Okay then.
@Ric-hard, full health must be 100, because
if (local.player.health <= 1) doesn't work as desired, but u're on the right track

.
@Jv, I think yours don't work (in my trials they didn't), because 'healonly' is a readonly variable; I get an errormessage sayin sth like that, if I try
local.player.healonly++.
Nevertheless, knowing ur and my scripting, I'm probably just misunderstanding ur two words
@Bdbodger, u're the winner

. Yours did what I want
Here's my workin code:
Code: Select all
givehealth1:
$health_trigger_1 nottriggerable
local.player = parm.other
$health_switch_1 anim turnon
while (local.player.useheld)
{
if (local.player.health <= 99)
{
$health_switch_1 playsound click_switch
local.player heal .01
}
local.waiting = local.player.health / 200 //this decreases healing speed towards 100%
wait local.waiting
}
$health_switch_1 anim turnoff
wait 1
$health_trigger_1 triggerable
end
Thanks and Merry Xmas to all of you
