Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Help with scrips
- xavilongo3
- Scratcher
65 posts
Help with scrips
Now I just need to fix the bug to improve the freezing time, which I've been able to fix for the most part.
The only problem is that it has to be the first turret for it to work, otherwise it doesn't improve.
Instead of playing the game to get the money, see if it works etc. I've made it so that if you press the Q key it adds money and also if you make the “IceTurret_FreezeTime” list visible you can see if it improves or not.
The only problem is that it has to be the first turret for it to work, otherwise it doesn't improve.
Instead of playing the game to get the money, see if it works etc. I've made it so that if you press the Q key it adds money and also if you make the “IceTurret_FreezeTime” list visible you can see if it improves or not.
- xavilongo3
- Scratcher
65 posts
Help with scrips
Hello
I have made new upgrades, new turrets, new enemies …. I've been making progress.
But as always there are problems, I think there are only two at the moment:
1- The ice turret has an additional upgrade which is to increase the time an enemy is frozen. In all the other upgrades it was easy because there was a variable to know which turret to upgrade, but it was a variable only for that 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 sprite that has the variable (the turret sprite), but in the program there are also more variables just for that sprite. In the end I found an alternative variable, but it only worked if you had the turret selected.
2- The second one is for a new enemy, that when you destroy it has to split small enemies, hence the name split. I created it, made the movement and everything, but I left out the important part of the split. I had thought that I could, inside the block that I have for when they are destroyed, if the enemy is the split send a message that spawns 5 small enemies, but it doesn't work (the spawn is a block that I have made that says the speed, life that each type has and creates them as clones). They start appearing from wave 7 onwards.
Instead of playing the game to get the money, see if it works etc. I've made it so that if you press the Q key it adds money and also if you make the “IceTurret_FreezeTime” list visible you can see if it improves or not.
I hope someone can answer me, please
If I'm explaining it wrong please tell me.
Help, please.
I have made new upgrades, new turrets, new enemies …. I've been making progress.
But as always there are problems, I think there are only two at the moment:
1- The ice turret has an additional upgrade which is to increase the time an enemy is frozen. In all the other upgrades it was easy because there was a variable to know which turret to upgrade, but it was a variable only for that 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 sprite that has the variable (the turret sprite), but in the program there are also more variables just for that sprite. In the end I found an alternative variable, but it only worked if you had the turret selected.
2- The second one is for a new enemy, that when you destroy it has to split small enemies, hence the name split. I created it, made the movement and everything, but I left out the important part of the split. I had thought that I could, inside the block that I have for when they are destroyed, if the enemy is the split send a message that spawns 5 small enemies, but it doesn't work (the spawn is a block that I have made that says the speed, life that each type has and creates them as clones). They start appearing from wave 7 onwards.
Instead of playing the game to get the money, see if it works etc. I've made it so that if you press the Q key it adds money and also if you make the “IceTurret_FreezeTime” list visible you can see if it improves or not.
I hope someone can answer me, please
If I'm explaining it wrong please tell me.
Help, please.
- loolooqq831
- Scratcher
4 posts
Help with scrips
just when bullet hit enemy send message to enemy to divided by half its original size.
- xavilongo3
- Scratcher
65 posts
Help with scrips
Yes, it is what I did, but with a little more of coding.
But, it didn't work.
But, it didn't work.
- loolooqq831
- Scratcher
4 posts
Help with scrips
maybe if you create a whole different sprite that records how much its dived by and then when it gets to a certain point delete the clone or stop creating divided.
- xavilongo3
- Scratcher
65 posts
Help with scrips
Hello, I have some good news. I've finally been able to get it to split, but as always, there are problems.
To find out if you can pass to the next wave, there is a list called EnemyIDs which lists all the enemies that appear and eliminates the ones that you kill or reach the end of the path. The problem is that when you kill the “split” enemy the others are killed too (which doesn't have to happen), but they are not removed from the list and the turrets go crazy shooting at the enemy that doesn't exist.
Also the small enemies don't spawn where the big one died.
Please before you say anything, look at the Enemy sprite programming.
Please it's important that you look at it.
To find out if you can pass to the next wave, there is a list called EnemyIDs which lists all the enemies that appear and eliminates the ones that you kill or reach the end of the path. The problem is that when you kill the “split” enemy the others are killed too (which doesn't have to happen), but they are not removed from the list and the turrets go crazy shooting at the enemy that doesn't exist.
Also the small enemies don't spawn where the big one died.
Please before you say anything, look at the Enemy sprite programming.
Please it's important that you look at it.
- Discussion Forums
- » Help with Scripts
- » Help with scrips