I’m trying to go for the bonus in Kelvintaph Crusader (save all allies), so I program my paladin to heal friends that have low health. However, the paladin immediately casts “heal” on a fully healthy friend after just half a second, and then he cannot cast again for next 5 seconds (cooldown). The relevant code is shown in the screenshot. Probably I’m missing something, or probably it’s a bug. I tried to debug the issue, but I have questions about debug() too
Try adding a now() check to avoid casting the spell for the first second as a test. I can’t seem to find an issue with the code, so I get the feeling that it might be some kind of initialization issue that exists at the beginning of the map.
Because you didn’t summon her, you have to command your paladin on the first frame, or she’ll do her automatic logic, which includes healing anyone who is damaged. Once you command her once, she’ll wait for orders from you. You don’t command the paladin to do anything on the first frame, since she can cast heal but there are no damaged friends. (I’m not saying that you should know this, just that this is currently the fix: tell her to attack or shield or something if she can cast heal but doesn’t find a damaged-enough friend to warrant it.)