I am trying to make an interplanetary golfing game (like gravitee, only better).
I was doing good until I found that there wasn't a "Move Towards" block.
This is how it should work:
Move {insert number here} steps towards {insert a sprite here}.
OR
Move to {insert a sprite here}.
OR
Move to edge of {insert sprite here}.
OR
Move{insert number here} steps towards edge of {insert sprite here}.
I would really appreciate it if you would add those 4 blocks.
Offline
This is pretty simple to do already.
When green flag clicked
forever
point towards {sprite name here}
move {whatever} stepsYou can modify that fairly easily to do whatever it is you need it to do. (For example, you might only have it repeat that a few times.)
Offline
I need to use the direction for something else, however. So your idea won't work.
But thanks for trying.
Offline
Seeing that you rejected Harakou's suggestion, the only thing I can think of right now is the <glide( )secs to x
personx )y
persony
Offline
Make a ghost sprite and do what harakou said?
A ghost sprite is on that is hidden, and is used for the movement of the original sprite.
Put harakous suggestion on the ghost sprite, and tell the golf ball to forever got to ghost sprite.
Offline
Harakou wrote:
Oh, I see. The movement needs to be independent of direction. You can pull that off with some trigonometry, but it could be tricky given Scratch's odd direction system.
Trig works fine in Scratch. Since trig functions repeat at 180 degree intervals, the "odd direction system" doesn't cause an issue - though I do agree that it's ODD to not use the convention that every textbook uses. I can only assume that there is good reason.
Here's a projectile motion project that uses a guide sprite to do "accurate" projectile motion without trig.
Offline
Mulan15262 wrote:
Move to {insert a sprite here}.
Ever heard of the <go to[ sprite block?

Offline
Greenatic wrote:
Mulan15262 wrote:
Move to {insert a sprite here}.
Ever heard of the <go to[ sprite block?
Wouldn't it be Glide to?
But yeah, your best bet would be a ghost sprite, and
Glide () seconds to (ghostspritename)
And have the ghost do
Forever
Glide (1) seconds to x position (Pick random (-238) to (240) y position pick random (175) to (-181)
Or from wherever you want, that's the whole screen.

Offline
OK, here's what I think:
Block #1: I just made a block that does this.
Block #2: This block already exists; | go to { v} |
Block #3: I might be able to script this.
Block #4: I don't think this is really necessary, considering that it is very similar to Block #1.

Offline
Wait, I have a question about Block 3. Did you mean for it to go *on* the edge of a sprite, or for it to *touch* the edge of a sprite?

Offline
woofwoof301 wrote:
Seeing that you rejected Harakou's suggestion, the only thing I can think of right now is the <glide( )secs to x
personx )y
persony
actually glide glitches if the sprite tries to move as well.
grr.. you forgot the
[/blocks]
tag so now my text goes all bold!
Last edited by joefarebrother (2011-08-11 03:50:31)
Offline
joefarebrother wrote:
woofwoof301 wrote:
Seeing that you rejected Harakou's suggestion, the only thing I can think of right now is the <glide( )secs to x
personx )y
persony
actually glide glitches if the sprite tries to move as well.
grr.. you forgot theCode:
[/blocks]tag so now my text goes all bold![/blocks]
Ever thought of putting it in yourself?
Offline