Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » boss attacks
- p00qy123
-
19 posts
boss attacks
I have already finished all my bosses attacks but i need a way to keep track of the attacks and phases. I was thinking that i could just do a repeat until and then a pick random and send a message for the attack i want to do but some attacks break if i message it while its attacking so i need a way to exclude attacks that are currently being used.
- BZANDT_
-
49 posts
boss attacks
Could you link the project?
I used variables for my boss game, I made a “roll” var and I made it pick random 1 to 4 every 10-15 seconds. Then, the bullet sprite linked to my boss would do a certain attack if the roll was a certain number.
EX:
For phase, just make a phase variable and whenever the boss reaches 0 health or something set the phase to whatever phase it's going to next.
TL: DR: use variables
I used variables for my boss game, I made a “roll” var and I made it pick random 1 to 4 every 10-15 seconds. Then, the bullet sprite linked to my boss would do a certain attack if the roll was a certain number.
EX:
if <(roll) = [1]> thenIf you want to keep track of the phases and attacks, you could just make a variable for the phase and the current attack. The roll i mentioned previously would do well for that, since it is a variable and you could keep track of it by just showing it and looking at what attack is currently playing.
do something
end
For phase, just make a phase variable and whenever the boss reaches 0 health or something set the phase to whatever phase it's going to next.
TL: DR: use variables
Last edited by BZANDT_ (Dec. 15, 2023 15:46:01)
- p00qy123
-
19 posts
boss attacks
https://scratch.mit.edu/projects/919777751/
heres my hot mess
heres my hot mess
- BZANDT_
-
49 posts
boss attacks
https://scratch.mit.edu/projects/919777751/Hmm… you're using list blocks (and my game uses purely variables for attacks) so I do not know how to help you. Someone who knows how to use list blocks better than I do should. Sorry for the inconvenience, I wish you good luck on your game!
heres my hot mess
- 27xz
-
65 posts
boss attacks
If you are using a list, you could simply remove the attack from the list when it is triggered, then add it back again after said attack is done playing.
- Skeletonking513
-
1 post
boss attacks
So I'm making a boss and I want the boss to have phases with different attacks. I don't know how to activate different phases using health because I want phase 2 to trigger when his health is at 400, phase 3 to trigger when he's 300 until he eventually gets to zero and it ends. If anyone knows how to do this, PLEASE tell me.
- user10234576
-
34 posts
boss attacks
So I'm making a boss and I want the boss to have phases with different attacks. I don't know how to activate different phases using health because I want phase 2 to trigger when his health is at 400, phase 3 to trigger when he's 300 until he eventually gets to zero and it ends. If anyone knows how to do this, PLEASE tell me.
This might help,
if <<not <(phase) = [3]>> and <<not <(phase) = [2]>> and <(bosshealth) < [401]>>>then
set [ phase] to [2]
end
if <<not <(phase) = [3]>> and <(bosshealth) < [301]>> then
set [ phase] to [3]
end
- Discussion Forums
- » Help with Scripts
-
» boss attacks