I'm trying to make script that stops a sprite from being seen when it is behind another sprite.
Offline
You could make it so that it hides if touching another sprite.
when gf clicked forever if <touching? [sprite 2 v]> broadcast [hide sprite one] end when i receive [hide sprite one v] set [ghost] effect to (100)That could be one way.
Offline
CAA14 wrote:
You could make it so that it hides if touching another sprite.
when gf clicked forever if <touching [sprite 2 v]?> broadcast [hide sprite one v]when i receive [hide sprite one v] set [ghost v] effect to (100)That could be one way.
Hope that helps,
CAA14
Fixed.
awesomeguyting wrote:
I'm trying to make script that stops a sprite from being seen when it is behind another sprite.
CAA14's method would work, though here's another way if you'd like to look (for the sprite that's showing/hiding):
when gf clicked forever if (touching [Sprite2 v]?) set [ghost effect v] to (100) else set [ghost effect v] to (0) end
Last edited by ErnieParke (2013-02-01 21:49:08)
Offline
Yes, that would be simpler.
But you must make sure that the sprite is told to "show" at some point, or the ghost effect won't make a difference.
Sorry, I'm still learning scratch.
Regards,
CAA14
Offline
Or you could simply use
forever if <touching [sprite1]?> go to front
Last edited by Blazingwave (2013-02-01 23:15:37)
Offline
Thank You for helping me guys
You might see my new game soon now
Offline
Here's the way I would do it:
when gf clicked forever if (touching [Hiding Place] ?) go back [1] layers else go to front endHope that helps!
Offline