This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-12-10 15:29:26

cmp8841
Scratcher
Registered: 2011-06-19
Posts: 31

Problems... Cant get project working...

Im making a scratch game where your a race car, with a moving backround and other racecars going against you. I know how to do moving backrounds and such, and how to make the backround move in certain ways compared to your angle and speed, but my ONLY problem is....
The other racecars that race against you are sopposed to automatically know where to go. I've got that part down. (on how to make them think on their own depending on how the race track looks(where to turn, speed, stay strait)) BUT, how do I get the other cars to go off the screen and have their turning move them in certain directions to make their x and y co-ordinates to make them crash or vear off or speed up in front of you then accidentally shift back behind you.
Right now, My script just makes it seem like paint on the road, because it moves with the backround.

Here is the script I have right now:

<when green flag clicked>
<go to x sad  21 )y sad  61 )
<forever>
<set{ yellow car angle }to( <direction> )
<go to x sad  (( (( <{ ScrollX }> <+> (( <{ yellow car speed }> <*> <sin( <{ yellow car angle }> )) )) <+> 21 )) )y sad  (( (( <{ ScrollX }> <+> (( <{ yellow car speed }> <*> <cos( <{ yellow car angle }> )) )) <+> 61 )) )

Thanks allot!  wink
P.S. this uses allot of trigonomitry and a little of algebra, so if you dont understand those, don't bother, but chanks for stopping by.

Last edited by cmp8841 (2011-12-15 17:53:35)

Offline

 

#2 2011-12-15 17:41:56

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Problems... Cant get project working...

Sorry, I'm not that good with trigonometry.

And I reckon this would belong better in the 'Advanced topics' forum. You'll probably get better replies there!  wink


Why

Offline

 

#3 2011-12-16 10:34:33

lucychocolate
New Scratcher
Registered: 2011-12-16
Posts: 7

Re: Problems... Cant get project working...

When you press the car on the script section you can choose what direction to move on
fist you put
when green flag clicked
forever
(and then choose your direction)
hope i helped

Offline

 

#4 2011-12-16 10:37:22

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Problems... Cant get project working...

cmp8841 wrote:

RedRocker227 wrote:

Sorry, I'm not that good with trigonometry.

And I reckon this would belong better in the 'Advanced topics' forum. You'll probably get better replies there!  wink

I accually was JUST about to copy my post and put it in advanced topics  wink  Will that work?

If you just press the 'Report' button on the original post, then you can ask for it to be moved there. (It's at the bottom right corner of every post). It sends a message to the Community Moderator and Scratch Team, who can move it.

Last edited by RedRocker227 (2011-12-16 10:37:44)


Why

Offline

 

#5 2011-12-24 12:41:45

cmp8841
Scratcher
Registered: 2011-06-19
Posts: 31

Re: Problems... Cant get project working...

I really need help... Heres where you can comment, just click this http://scratch.mit.edu/forums/viewtopic.php?id=83656 Its the same thing, but more relavent

Offline

 

Board footer