Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do i make a color-coded hitbox functional while invisible?
- miasilly
-
8 posts
How do i make a color-coded hitbox functional while invisible?
currently making a point-and-shoot style game where it matters where you're aiming, but i cant get the color-detect hitbox to work while being invisible. is there a better way to do this without adding too much bloat to the game?
hitbox is a seperate sprite that overlays on top of enemy cowboy

script looks like this . the hitmarker is what detects the colors

fully functional when fully visible due to the color detection, however i would like to make it Invisible because Thats Kinda Required
hiding and 100% ghost makes it non-functional
i have already attempted this fast switch method i found on another post to no avail

edit: i would like to add this wont be a stationary enemy, he crouches and moves around
hitbox is a seperate sprite that overlays on top of enemy cowboy

script looks like this . the hitmarker is what detects the colors

fully functional when fully visible due to the color detection, however i would like to make it Invisible because Thats Kinda Required
hiding and 100% ghost makes it non-functional
i have already attempted this fast switch method i found on another post to no avail

edit: i would like to add this wont be a stationary enemy, he crouches and moves around
Last edited by miasilly (Aug. 9, 2023 06:15:15)
- Spentiline
-
100+ posts
How do i make a color-coded hitbox functional while invisible?
Never use the touching color block because it is very bad for performance.
Instead, use separate sprites for the hitboxes. That way, you can still use the ghost effect.
Instead, use separate sprites for the hitboxes. That way, you can still use the ghost effect.
- miasilly
-
8 posts
How do i make a color-coded hitbox functional while invisible?
Never use the touching color block because it is very bad for performance.
Instead, use separate sprites for the hitboxes. That way, you can still use the ghost effect.
i was hoping to not resort to this method since i wanted to keep the sprite count minimal…if it works it works though, ill use this method until a more efficient one crops up
- Pixilized
-
100+ posts
How do i make a color-coded hitbox functional while invisible?
The hidden aim custom block will not work. You must have a run without screen refresh, and switch costume to hit box and show the sprite. Then, run the color detection. Then, hide the sprite.
Last edited by Pixilized (Aug. 9, 2023 12:25:15)
- Discussion Forums
- » Help with Scripts
-
» How do i make a color-coded hitbox functional while invisible?