Pages: 1
Topic closed
I think this belongs in Help with Scripts.
Try this:
when gf clicked show wait until <touching [Sprite2 v]?> hideSet 'Sprite2' to whatever you want it to touch then disappear.
Last edited by SciTecCf (2012-05-28 11:39:06)
Offline
Yes it does belong in help with scripts, but the script in SciTecCf's post will work beautifully.
Offline
SciTecCf wrote:
I think this belongs in Help with Scripts.
Try this:when gf clicked forever show wait until <touching [Sprite2 v]?> hideSet 'Sprite2' to whatever you want it to touch then disappear.
added a forever
Last edited by berberberber (2012-05-28 17:01:44)
Offline
berberberber wrote:
SciTecCf wrote:
I think this belongs in Help with Scripts.
Try this:when gf clicked forever show wait until <touching [Sprite2 v]?> hideSet 'Sprite2' to whatever you want it to touch then disappear.added a forever
the wait until block means theres no need, it would be a forever if it used an "if" statement
Offline
Like this:
when gf clicked show forever if <touching [Sprite2 v]?> hide
Offline
@berberberber- Actually, you don't want a forever loop. What would happen? The main sprite (let's call it Sprite1) would start out shown, and then once it touched the other sprite (Sprite2), it would hide. But then the script would jump back to the beginning of the forever loop and show Sprite1 again. In fact, if Sprite1 is still touching Sprite2, it will flicker between hidden and shown. Presumably, you want the script to stop after Sprite1 touches Sprite2 (unless you want Sprite1 to reappear when they are no longer touching).
Last edited by amcerbu (2012-05-30 22:31:40)
Offline
They aren't fighting, don't worry. amcerbu is merely pointing out something that berberberber hadn't apparently thought of. And have you fixed the problem?
Offline
amcerbu wrote:
@berberberber- Actually, you don't want a forever loop. What would happen? The main sprite (let's call it Sprite1) would start out shown, and then once it touched the other sprite (Sprite2), it would hide. But then the script would jump back to the beginning of the forever loop and show Sprite1 again. In fact, if Sprite1 is still touching Sprite2, it will flicker between hidden and shown. Presumably, you want the script to stop after Sprite1 touches Sprite2 (unless you want Sprite1 to reappear when they are no longer touching).
Yeah, I fogot to add another wait until.
Offline
3sal2 wrote:
Like this:
when gf clicked show forever if <touching [Sprite2 v]?> hide
I don't think that that would work... :\. Forever if means that if a condition is true, start the forever loop.
Offline
Topic closed
Pages: 1