Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Boss ain't spawning on my game Zombie Survivors W.I.P
- MineTurte
- Scratcher
500+ posts
Boss ain't spawning on my game Zombie Survivors W.I.P
Yeah I can. Hold on while I read everything lol.Heh trust me, I am.Did you just fix it because it looks exactly how I was about to make it lolheres the gameOkay I genuinely can't find out what's wrong and everything seems to be working fine but I'll just completely rewrite your code and hope it works better. One second
We're looking at the “boss zombie” sprite. Its coded to spawn when it receives the broadcast “bossfight”
In the “normal zombie”, “electro zombie”, and “tank zombie” sprites, at the end of the spawning scripts it should be broadcasting “bossfight” approximately 130 seconds into the game after picking up the first gun but it never seems to be doing so and instead just continuing to spawn the zombies instead of spawning the boss. Not sure what's causing this, would be nice to have somebody look into this and find the solution.
Pretty sure the issue comes along somewhere with the use of the timer block used frequently in the spawning scripts, there's definitely a better way to code that.
Please don't mind my messy code. If you couldn't tell, I'm a rookie.(thanks for the help!)
wait so does it look fine but it doesn't work or does it look fine and you verified that it works
also I changed something that was wrong I forgot to change earlier so you should probably refresh
and thanks for the help, I'll be relying on you for later bugs because you always seem to be active lol!
and if your online could you check out any of the bugs I mentioned? would be nice
Update: Everything appears to be working pretty good. I suggest though rounding the HP so it's not a messy decimal that can sometimes get really long.
Last edited by MineTurte (March 27, 2024 13:54:17)
- toad_duzz
- Scratcher
38 posts
Boss ain't spawning on my game Zombie Survivors W.I.P
Don't worry, we're happy to help, you don't have to feed bad about how often you're asking things. also I realized how frequent I've been asking you stuff I need to chill it
Usually what I do for buttons is this:when gf clickedand when it's clicked once, it does the first action, and when clicked twice. it does the second, this works for any amount of clicks.
set [clicks v] to (0)
when this sprite clicked
set [clicks v] to ((1) - (clicks))
if <(clicks) = (1)> then
broadcast (armor menu v)
switch costume to (costume 2 v)
else
broadcast (menu v)
switch costume to (costume 1 v)
Also, the crosshair sprite is in the way of clicking, so either make it hide until the game starts, or make it so “if touching crosshair and mouse down” instead of when this sprite clicked.
i dont know if you still use scratch but if you still do, can you check out this problem im having? would be nice
here
edit: issue resolved, used the following code on each sprite that uses clones:
when I receive [start]
delete this clone
Last edited by toad_duzz (April 28, 2024 18:04:29)
- Discussion Forums
- » Help with Scripts
- » Boss ain't spawning on my game Zombie Survivors W.I.P