Draw Function Not Working Properly

I have a sprite that is supposed to trigger the player's draw function but doesn't. When the player interacts with this sprite, a variable is increased to 1. I have this in the player's "on draw do" section:

if gaveFlowers==1 then
	draw heart at 12,7
	gaveFlowers++
end

gaveFlowers is set to 1 when the player interacts with the sprite but the heart does not appear. The heart should appear at the coordinates I list once because the variable is increased again to two after the heart gets drawn. What am I doing "wrong"? I put wrong in quotes because I am looking at the documentation and I feel like I am following what it says. Any help would be appreciated. I'm basically trying to have a heart show up when the player touches this other sprite. Other than this one issue I feel like I am making pretty decent progress using Pulp, but this one issue is making me crazy.

In my testing, using your code, it appears for a very short period of time, this is because it instantly stops the drawing after only doing it once, you could use a wait function if you are having trouble seeing it for that short period, or want it to last longer. Example:

if gaveFlowers==1 then
	draw heart at 12,7
       wait 1.5 then
	gaveFlowers++
  end
end
1 Like

Ah, I get what you are saying. Sounds like I should be using swap to really make it permanent. Thanks for the input, that helped me figure out a way to get where I needed to go.