xavilongo3 xavilongo3 loading
Hello
I’m making the typical game that there’s a path where enemies pass and you have to buy turrets to be able to kill them.
I have had some problems but I have been solving them, but there are two that I know the reason but not looking for a solution. There is one of them that I could fix, but I made some changes in another program and shortly after it stopped working, I deleted the changes that I made if it was fault of that but no, it still did not work.
Well these are the two problems I have:
The first is that each turret can upgrade the range, the firing speed and the damage it does. The problem is with a turret that its ability is to freeze the enemies it hits, it has a longer reload time compared to others, because otherwise it would be too “roto” (I don’t know how to say it in English, it means when something in a game is too good compared to what we have and it makes you have a better chance of winning). So if I put in the upgrade of firing speed, that’s what would happen, it would be too “roto”. So I changed it with upgrade of freezing time. I do it like the others in a list, but in all the others it was easy because there was a variable to know which turret to upgrade, but it was for only for the turret sprite. Instead, this upgrade is programmed on another sprite (enemy) so I can’t use that variable. I had thought about sending a message to do the freeze part in the turret sprite that has the variable, but in the program there are also more variables just for enemy sprite. I also thought of just doing the wait time there but it doesn’t work either because it encompasses all enemies.
The second is that there is an enemy that when is killed is divided into small enemies. Then, I made it in the program where they die, that if it is that kind of enemy (called split), spawn three small enemies (called piecesplit). The spawning is a block where you fix the characteristics of each of the types of enemies such as speed, life, the costume… and then creates the clone (x) times waiting a (x) time between each. But it did not work if I put that when he died send a message to be spawned and work, but only needed to put that spawnen in the position where he was when he died, I made some variables for position x, y and the direction. Then I prove it when the big one dies they appeared in the middle of the road and they went backwards, I was looking at it and I could not solve it so I deleted the part that told them where they had to appear. And now, what they do is appear at the starting point, but the weirdest thing is that they do not appear until they die I think it is because the message encompasses everyone but I put that only when they did not have life but it remains the same. They also tried to put it together within the program where they died and began to learn but invisible. So I no longer know how to do it I have prove all the things that have crossed my mind, even if they do not have much sense.
I’ve also made some changes to make your work easier, I have made that if you press the Q key gives you money and the split enemies start to appear away from round 8 so that in order not to make you heavy do all the rounds I have made the normal ones now are the ones that divide.
I’ll change it later.
Let me know if you find another bug/problem.
Here I leave the link of the game so you can watch the programs or anything: https://scratch.mit.edu/projects/965491373
Thank you very much.