helb
id: 750427
category: Help with Scripts
posts: 14
coolgreat1247
loading
im coding a boss rush where if you click the boss it gets damaged and the next one appears BUT the hidden other bosses also register my clicks so they can get killed in the middle of a battle, causing 2 bosses to appear at once
kingKASEtheGREATalt
loading
posting the project could help
coolgreat1247
loading
but that would spoil it posting the project could help
kingKASEtheGREATalt
loading
it's hard to help with code without seeing the code you have, maybe post the mouse click script through the built-in scratchblocks?but that would spoil it posting the project could help
coolgreat1247
loading
when I receive [Attack v]
if <touching [mouse pointer v] ?> then
change [health v] by (-1)
end
kingKASEtheGREATalt
loading
does the variable health edit every boss's health? that could be whywhen I receive [Attack v]if <touching [mouse pointer v] ?> then
change [health v] by (-1)
end
coolgreat1247
loading
no, each boss has a seperate variabledoes the variable health edit every boss's health? that could be whywhen I receive [Attack v]if <touching [mouse pointer v] ?> then
change [health v] by (-1)
end
ebeachhill
loading
I have a solution. Maybe add a variable to tell which boss you're on, then only have that respective boss show up.
when I receive [ boss defeated v]
change [boss # v] by (1)
forever
if <(boss defeated) = [4]> then
show
else
hide
end
end
coolgreat1247
loading
thats exactly what i did I have a solution. Maybe add a variable to tell which boss you're on, then only have that respective boss show up.when I receive [ boss defeated v]
change [boss # v] by (1)
if <(boss defeated) = [4]> then
show
else
hide
end
ebeachhill
loading
then why are multiple bosses showing up? (also tbh clicking is never the best way to kill a boss but ok)
make the bosses defeated variable global.
make all hp variables private.
make an if-else loop that every time the specific boss is killed, it changes bosses defeated by 1.
make the bosses defeated variable global.
make all hp variables private.
make an if-else loop that every time the specific boss is killed, it changes bosses defeated by 1.
kingKASEtheGREATalt
loading
have you tried this?:
forever
if <<touching [ mouse pointer] ?> and <(boss defeated) = [4]>> then
...
end
end
coolgreat1247
loading
yes have you tried this?:forever
if <<touching [ mouse pointer] ?> and <(boss defeated) = [4]>> then
...
end
end
ebeachhill
loading
here i don't even care about spoilers anymore just send the link you can send it on my profile if you want toyes have you tried this?:forever
if <<touching [ mouse pointer] ?> and <(boss defeated) = [4]>> then
...
end
end
kingKASEtheGREATalt
loading
its hard to continue helping without the projectyes have you tried this?:forever
if <<touching [ mouse pointer] ?> and <(boss defeated) = [4]>> then
...
end
end