Hey guys.
I’m trying to make a loop that draws player health at the top left corner of the screen as soon as the game loads up starting at 1,0 (x/y coordinates) and ending at 5,0. I already wrote a method in the player script that I call in the game script, but it doesn’t seem to be doing anything. I will try fixing this issue, but for now, does anybody have any ideas for how I could get my drawPlayerHealth method to actually work? Thanks in advance.
Here is the code":
[player script]
on drawPlayerHealth do
barToFill = 0
if playerHealth!=5 then
while playerHealth==0 do
playerHealth++
barToFill++
draw "healthbarFill" at barToFill,0
end
end
end
[game script]
on start do
playerHealth = 0
call "drawPlayerHealth"
end