Help with my 2D platformer shooter please!

Can someone help me with my 2D platformer shooter game?
Link: https://makecode.com/_YesbiKJfoWhe

I need help with these few points:

  • Out of all the combat forms spawned (Those walking guys you meet in the beginning), only one follows my game update code.
  • The turrets that you spawn, I have a few issues: 1, The spawn rate is random, and 2, only one turret fires missiles. The others apparently don’t function at all.
  • The goopers at the back have the same problem as the turrets.

Notes:

  • I’m not done with the game.
  • I’m still working on enemy ai and level maps so once you finish the first level you’ve technically “won”.
  • I’m very bad at animations :stuck_out_tongue:
  • I’ll probably add more if I have any more issues.

Liking what I see so far! Looking forward to further iterations!

I think I see what’s happening. They all seem to be a related problem. Let’s take a look at your first bullet:

I believe we’re looking at this code, then:

Your variable combatform points to one, single sprite. I think you have the right idea with the for element loop, but you never use the loop variable, value. In that for element loop, each time the code in the loop runs, value points to a different sprite.

What I think you want is this:

Take a look at your other code for the other two bullet points and make similar adjustments. If you need help, or if I got this totally wrong, just let us know!

If I can offer you another suggestion: I noticed your forever loops all start with a pause. You may want to switch those loops to on game update every X ms instead.

Your code looks great! Really nicely organized and really good use of functions. Nice work!

2 Likes

Thank you so much! It really worked, and after some 30 minutes of playing around I got every sprite under its kind to do what it’s supposed to do! Thank you so much for your time and effort to help me!

(LINK FOR THE GAME SO FAR: https://makecode.com/_UaHbx27LPfd8)

1 Like

Can i try this gamww @personalnote the latest version or the last link you sent is the latest version?