i wish i could make a video game on scratch,i mostly need help on these things-
the part where you stop in midair when you land on a surface thats NOT on the edge
the part where you freeze when you touch a enemy
the part where...lets just say you have a lazer,how do i make the enemies die when the lazer touches them?
when like,theres coins in the game in the game, how do i make the coins dissapear when i touch them,how do i mke the number of coins increase when i touch coins?
Please respond!
-HotDog10
Offline
This isn't advanced... please keep things like this to the All About Scratch forum.
For all four things, have the sprites constantly check if they need to take action (use a boolean block). But when they take action:
For 1 and 2, for freezing you can set a variable that the script (the one that moves the sprite) is checking. Put it like this: If the variable equals 1, the script will make the sprite move. If the variable equals 2, the script won't make the sprite move.
For 3, do as above but instead of having the script just stay inactive, it does the die stuff. Make the script stop at the end.
For 4, once a coin has sensed that it's touched the sprite, make it hide. Have a variable for the number of coins, and once the coin hides increase the variable by 1.
Any questions?
Offline