i would like a block that sets a sprite to vehical to another sprite this means it will not alwas be going to the sprite but it will move with it her is an example
when green flag clicked
set vehical of [sprite1] to [sprite 2]
then no matter were sprite 1 on the field is if sprite 2 goes up down left or right it moves with
it also lets it rotate around a turning sprite
THIS IS NOT THE SAME AS
[blocks]<forever>
<go to[ sprite]
<end> [/blocks]
Last edited by slayerrobe7 (2012-01-25 20:20:20)
Offline
Offline
i dont want it to go to a sprite i want ti to move with sprite
Offline
slayerrobe7 wrote:
i dont want it to go to a sprite i want ti to move with sprite
Use a repeat or forever block.
It will go to the sprite until it stops.
Last edited by owetre18 (2012-01-23 15:16:21)
Offline
(sigh) no
suppose sprite 1 and 2 are 20 steps away sprite 2 is vehicaled to sprite1 sprite 1 moves ten steps and because sprite 2 is vehicaled it moves 10 steps also and is still 20 steps away
Offline
bump
Offline
Ooh, ooh I know! It's like a sprite following another sprite!
http://dl.dropbox.com/u/34855482/done.gif
Offline
I am not sure what vehical means, do you mean vehicle?
Offline
yes and yes
Offline
the difference between that script and vehicle it rotating around the sprite lets assume you use that script to hold the upper and lower arm of a person together th upper arm turns the lower arm stays still how do you fix that you need a vehicle block
Offline
slayerrobe7 wrote:
the difference between that script and vehicle it rotating around the sprite lets assume you use that script to hold the upper and lower arm of a person together th upper arm turns the lower arm stays still how do you fix that you need a vehicle block
Or you could use two different arm sprites...
Offline
ya but you cant have them detach so you need to vehicle them to each;other
Offline
Okay, so let's use a body sprite, an upper arm sprite and a lower arm sprite.
The upper arm sprite will have its center (in the paint editor you set its center) where its shoulder is. The upper arm can rotate freely that way. The lower arm's center will be the elbow. Then the lower arm will attach to the upper arm like this:
<forever>
[go to upper arm]
[set direction to (direction of upper arm)]
[move {} steps] - Or how long the upper arm is
[set direction to {}] - Or whatever scripts to make the lower arm rotate
<end>
Offline
no i don't think that would work like vehicle mainly because of a problem with sprite centers
Offline
how
Offline
instead of it going to a part of the sprite it maves with it if sprite 1 moved 10 steps so would sprite to in the same direction even if sprite 2 was pointing backwards but if they are distant all stays the same also if sprite1 turns sprite3 rotates around it
Offline
is my assumtion
Offline
i dont know what that is so maby
Offline
Okay...
I think this will fix it up.
forever point towards [sprite v] move (however many, depending on distance required) steps endAnd to fix the sprite centers thing, make another costume with a different center.
Last edited by wolvesstar97 (2012-04-23 21:58:14)
Offline
slayerrobe7 wrote:
i dont know what that is so maby
It lets you attach a sprite to another
Example:
It makes it so when the main sprite moves, the other sprite goes with it! (not following or goto)
Think that's what you want!
You can find the app at byob.berkley.edu
And to attach in that scratch version, drag a sprite from the sprite bar into a sprite on the stage.
Offline