Hey guys you know in Scratch Wiki it says to do When Flag Clicked Forever If absolute value of x position greater than 480 hide else show? Well this technique does not work well. If you are scrolling across with 480 size, use this instead. The exact same script but instead of greater than 480 put 300. It works as soon as the player is on to another platform or is away from the other one. It works well!
Offline
Offline
ImagineIt wrote:
It works better with 460 to me.
It shouldn't - Scratch screens are 480 pixels wide. Thus 480 is the optimal screen size. Anything less than that, and the screens will overlap eachother; anything more than that, you'll get large gaps between them.
Offline
coolstuff wrote:
ImagineIt wrote:
It works better with 460 to me.
It shouldn't - Scratch screens are 480 pixels wide. Thus 480 is the optimal screen size. Anything less than that, and the screens will overlap eachother; anything more than that, you'll get large gaps between them.
yeah, but sometimes they don't go to 481 or -481.
Offline
ImagineIt wrote:
coolstuff wrote:
ImagineIt wrote:
It works better with 460 to me.
It shouldn't - Scratch screens are 480 pixels wide. Thus 480 is the optimal screen size. Anything less than that, and the screens will overlap eachother; anything more than that, you'll get large gaps between them.
yeah, but sometimes they don't go to 481 or -481.
Ah, yes! It should be 240, then.
Offline
coolstuff wrote:
ImagineIt wrote:
coolstuff wrote:
It shouldn't - Scratch screens are 480 pixels wide. Thus 480 is the optimal screen size. Anything less than that, and the screens will overlap eachother; anything more than that, you'll get large gaps between them.yeah, but sometimes they don't go to 481 or -481.
Ah, yes! It should be 240, then.
240? 300 worked best for me.
Offline
Offline
ImagineIt wrote:
I still like 460.
Does it even work?
Offline
If you use a specific position to decide when to hide, you have to experiment, because it will depend on the sprite's size. (Character sprites that go off-screen have to hide too.)
I use this technique; set a variable (CommandX) to where the sprite needs to go, then "Set X to (CommandX)". Then check the absolute value of the difference between CommandX and Xposition; If this is greater than 1, the sprite couldn't go where you told it to go and should hide, else it is still on screen and should show.
Offline
EdnaC wrote:
If you use a specific position to decide when to hide, you have to experiment, because it will depend on the sprite's size. (Character sprites that go off-screen have to hide too.)
I use this technique; set a variable (CommandX) to where the sprite needs to go, then "Set X to (CommandX)". Then check the absolute value of the difference between CommandX and Xposition; If this is greater than 1, the sprite couldn't go where you told it to go and should hide, else it is still on screen and should show.
No offense but it seems you do a lot of stuff in a more complicated way.
Offline
I'd say that this "complicated way" pays off - It's really not that much (two variables); and once you make the script in one sprite, you just drop it into the others - and it works whether the sprite is a small bullet or a big landscape. If you look at the enemy sprites in AsteroidBattle, you'll see that they are all identical except for the two variables (angle and radius) that specify their "World Location".
To each his own, I suppose, but if you use a specific number, and get it working, then change the sprite's costume, the hiding might stop working correctly - I know, because I've been there and done that...
Offline
JJROCKER wrote:
At first, I thought you meant you want to make a terrain invisible
in that case, make it and make it 99.999 ghost effect
![]()
Make it and make it?
Offline
Thescratch3 wrote:
JJROCKER wrote:
At first, I thought you meant you want to make a terrain invisible
in that case, make it and make it 99.999 ghost effect
![]()
Make it and make it?
Lol, I meant make the sprite and then make it 99.999 ghost effect
Offline