Sprite Spawning based on Variables

Hi,

I am working on an game and I am trying to generate sprites on a canvas based on a variable, however this is not working. Any help is appreciated.

1 Like

Show your blocks? Can’t help without more info!

1 Like

ok, sorry about that! code|508x500

1 Like

The quality is awful. Show them properly like everyone else does.

Sorry? This is my first time asking for help so I don’t really know “what everyone else does”.

1 Like

Show a proper image of your blocks please.

I think this is “proper”? If not feel free to let me know!

1 Like

What specifically isn’t working? Where you show and hide sprites?

Yes, it loads them both for some reason regardless of what the variable is. It’s rather annoying. I also tried generating the sprites but it just led to the same issue.

1 Like

Do both sprites start out as hidden?

1 Like

I would try adding a “hide sprite2” and a “hide sprite3” blocks as first in “when screen1 starts”

I just did as you suggested with no luck :frowning: . Still have both sprites spawning in at the same time.

1 Like

I have had issues with initializing variables and using them at the same time. Try adding a “wait 1 second” block before you set variable BHealth.

1 Like

THANK YOU SO MUCHHHHHH :slight_smile: .

1 Like

It worked? That’s good I was typing another solution and didn’t see this right away. Good luck!