1. Make a countdown for every bounce off of the edge or another sprite, starting at 16?
2. Make something move 5 steps along only a single axis but be the same place as the mouse on that axis (or try).
Last edited by Firedrake969 (2012-07-21 13:45:40)
Offline
You could change a variable by 1 whenever it bounces, ad then the variable is 16 stop the script.
Offline
Wes64 wrote:
You could change a variable by 1 whenever it bounces, ad then the variable is 16 stop the script.
like this?whenclicked
setnumber ▼to16iftouchingoredge ▼touchingsprite 1 ▼changenumber ▼by-1
Offline
Yes, but I have a more complicated script, so it might not fit in. Look at my game.
Offline
Anyone help me? This is an example of a block (or blocks) I need:
move5steps tomouse x
Last edited by Firedrake969 (2012-07-22 10:45:53)
Offline
Could you use something like this?:
sorry my scripts are a little messed up:Lforeverifmouse x<x positionpoint in direction-90elsepoint in direction90ifabs ((mouse x) - (x position))>5move5steps
Last edited by Prestige (2012-07-22 10:59:33)
Offline
Firedrake969 wrote:
1. Make a countdown for every bounce off of the edge or another sprite, starting at 16?
2. Make something move 5 steps along only a single axis but be the same place as the mouse on that axis (or try).
Offline
An example of what I need is
forvar1changed by-1changevar2by-1
Offline
You could change them at the same time...How do the variables relate to each other? Are they always equal? Always a certain amount apart?
Offline
Well, lets put it at this: If you buy an asset, you get it for a certain number of bounces. How do I make it count down until you have no bounces left, thus removing the asset?
Offline
An alternative for movement along a single axis (that I think is more simple):
Making it "greater than 3" instead of "greater than 5" is a slight improvement on the last script, and using the "change x" block more explicitly shows what you want (if someone wants to download and look/understand your script) as well as - arguably - more directly accomplishing it.whenclicked
forever if>abs ▼ofmouse x-x position3ifmouse x>x positionchange x by5elsechange x by-5
Last edited by MoreGamesNow (2012-07-24 15:40:43)
Offline
In your ball sprite, there is a script that looks like this:
Add the "change [Bounces v] by (1)" block.iftouchingedge ▼?ifgball=truepoint towardsStick ▼move6stepselsepoint in direction180-directionmove6stepsturn
pick randomdegrees-40to40
iftouchingedge ▼?changeBounces ▼by1ifgball=truepoint towardsStick ▼move6stepselsepoint in direction180-directionmove6stepsturn
pick randomdegrees-40to40
Last edited by MoreGamesNow (2012-07-24 19:40:49)
Offline