Clones Trouble (Please Help)

help
helpwithcode

#1

So I am making a thing for a math project in hopscotch, but I have multiple problems with it. So far what I've done is made a draft where you defeat enemies using math. But 4 things happen:
1. The game LAGS LIKE CRAZY when you take too long.
2. I have told the game to advance when you defeat 3 enemies, but for some reason it does not work.
3. Some times the enemies just clone like crazy.
4. Sometimes this happens (it flicks back and fourth):

Here are some other pictures:

Here is the link to the web version project:

https://c.gethopscotch.com/p/xwvwwuejs
(for some reason, collision doesn't work in this web version)

and if you want to see the code just search wowmom98 under hopscotchers and play the one with the title "Don't play this its not finished"


#2

Hi @pgodin welcome to the Forum! I'm not that great at coding so I can't really help you. You should try tagging @Huggingfluffybear or @Bubbles4Ever929. Maybe they can help you.


#3

Hmm I will see what I can do! Let me look!


#4

I fixed the lag but now you can't move look!

https://c.gethopscotch.com/p/xx14oy9ai


#5

I removed the clones, it shoots slower but doesn't lag... https://c.gethopscotch.com/p/xx17thg3c


#6

It looks better now


#7

Well I discovered something.

I discovered why it does not advance.

So I made a text object always set itself to the variable defeated. I have made it so something happens when you get to 3 defeats.

So after a SINGLE defeat, for some reason it sets it to 2.

After 2 defeats, it sets it to 5

and after 3 defeats, it sets it to 9.

So that's at least one problem solved, but I don't know why it does this


#8

Do you need help with anything more?


#9

Yes, because I still don't know why it does this and I don't know how to fix it entirely


#10

My main problem now is that he blinks back and forth when defeated equals 9. I made a new version so just go onto my profile.


#11

What is your username?


#12

wowmom98, as I said earlier