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

#1 2012-12-10 12:40:02

The1UP
Scratcher
Registered: 2011-11-01
Posts: 500+

A few problems I'm having

I'll start from the beginning.

I've decided to make a game based on "Save our Dumb Planet" which is an education game on Manga High, a website which strives to help people with maths.

Now, one of the 2 main problems I'm having, is that I don't know how to make a sprite glide to another, because this sprite I want to glide to will start from a random location, therefore I cannot glide to a set location. Is there any way I can get past this?

The other problem involves having a question asked and the answer to do with a formula, as "Save our Dumb Planet" involves the use of y=mx+c, a mathematical formula used to describe straight lines in a graph. I haven't got much experience with questions and answers, so the help on this will be very useful to me.

Anyone care to help?


Ya know what, no signature. You have this useless dialogue to look at now.

Offline

 

#2 2012-12-10 12:43:59

firedrake969_test
Scratcher
Registered: 2012-08-08
Posts: 500+

Re: A few problems I'm having

go to random position
glide (num of secs) secs to x:([x position v] of [sprite v]) y:([y position v] of [sprite v])


Alt of Firedrake969.

Offline

 

#3 2012-12-10 12:46:47

The1UP
Scratcher
Registered: 2011-11-01
Posts: 500+

Re: A few problems I'm having

firedrake969_test wrote:

go to random position
glide (num of secs) secs to x:([x position v] of [sprite v]) y:([y position v] of [sprite v])

That helps.

Thank you very much. :3

Although, I'm still faced with my second problem, which I do accept probably requires an advanced programmer's help (not to say you aren't).

Last edited by The1UP (2012-12-11 01:27:36)


Ya know what, no signature. You have this useless dialogue to look at now.

Offline

 

#4 2012-12-12 02:47:42

The1UP
Scratcher
Registered: 2011-11-01
Posts: 500+

Re: A few problems I'm having

bump


Ya know what, no signature. You have this useless dialogue to look at now.

Offline

 

#5 2012-12-12 03:26:19

Tecklop
Scratcher
Registered: 2009-08-20
Posts: 63

Re: A few problems I'm having

Whats the problem then? am sure not only advance programmers are capable of helping.
Please upload the project so we can see the problem.


http://neuropod.net/imagehost/uploads/ccd036346f6834ab872b4f233c158c82.png

Offline

 

#6 2012-12-12 05:49:23

BetaSmozzick
Scratcher
Registered: 2012-02-25
Posts: 51

Re: A few problems I'm having

Mm, please explain the second problem in more detail.

Offline

 

#7 2012-12-12 11:07:14

The1UP
Scratcher
Registered: 2011-11-01
Posts: 500+

Re: A few problems I'm having

Here's the link to the project.

To BetaSmozzick, sorry that I didn't explain the second problem in detail.

Take a look at the scripts to see if you can be cleared up. If you're still confused, just ask!  smile


Ya know what, no signature. You have this useless dialogue to look at now.

Offline

 

#8 2012-12-12 21:08:00

Tecklop
Scratcher
Registered: 2009-08-20
Posts: 63

Re: A few problems I'm having

So whats the problem?


http://neuropod.net/imagehost/uploads/ccd036346f6834ab872b4f233c158c82.png

Offline

 

#9 2012-12-13 01:58:04

The1UP
Scratcher
Registered: 2011-11-01
Posts: 500+

Re: A few problems I'm having

Tecklop wrote:

So whats the problem?

Pfft, forgot to say that.  tongue

There's a question being asked, and the answer has to be y=mx+c, but this isn't a fixed formula per se.

"m" means gradient for whatever reason, and that's the steepness of the line the asteroid is to crash into Earth.

"c" means y-intercept, and that's the spot where the asteroid crosses the middle of the graph, so if it crossed -2, and the gradient was 3, the formula would be y=3x-2.

I'm just looking for a way to make sure the answer has to do with this, since the asteroid starts from a random location, so the gradient and y-intercept will be different.

The reason I asked help for this is because I haven't much experience with questions and answers in Scratch.


Ya know what, no signature. You have this useless dialogue to look at now.

Offline

 

#10 2012-12-16 10:43:53

The1UP
Scratcher
Registered: 2011-11-01
Posts: 500+

Re: A few problems I'm having

Bump.


Ya know what, no signature. You have this useless dialogue to look at now.

Offline

 

#11 2012-12-16 16:08:03

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: A few problems I'm having

The1UP wrote:

Bump.

Would you like the scripts for your project or would you like it more if I pointed you in the right direction?


http://i46.tinypic.com/35ismmc.png

Offline

 

#12 2012-12-17 07:46:16

The1UP
Scratcher
Registered: 2011-11-01
Posts: 500+

Re: A few problems I'm having

ErnieParke wrote:

The1UP wrote:

Bump.

Would you like the scripts for your project or would you like it more if I pointed you in the right direction?

Scripts for the project.  tongue

Never liked riddles or mystical clues and whatnot. XD


Ya know what, no signature. You have this useless dialogue to look at now.

Offline

 

#13 2012-12-17 12:38:05

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: A few problems I'm having

The1UP wrote:

ErnieParke wrote:

The1UP wrote:

Bump.

Would you like the scripts for your project or would you like it more if I pointed you in the right direction?

Scripts for the project.  tongue

Never liked riddles or mystical clues and whatnot. XD

It's oaky, though I have one last question; in your project, do you see you're whole planet, or is it flat-ish, meaning you only see about a 15th of it?


http://i46.tinypic.com/35ismmc.png

Offline

 

#14 2012-12-17 15:22:55

The1UP
Scratcher
Registered: 2011-11-01
Posts: 500+

Re: A few problems I'm having

ErnieParke wrote:

The1UP wrote:

ErnieParke wrote:


Would you like the scripts for your project or would you like it more if I pointed you in the right direction?

Scripts for the project.  tongue

Never liked riddles or mystical clues and whatnot. XD

It's oaky, though I have one last question; in your project, do you see you're whole planet, or is it flat-ish, meaning you only see about a 15th of it?

The entire planet, the link to the project is a few posts up.


Ya know what, no signature. You have this useless dialogue to look at now.

Offline

 

#15 2012-12-17 15:52:27

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: A few problems I'm having

The1UP wrote:

ErnieParke wrote:

The1UP wrote:


Scripts for the project.  tongue

Never liked riddles or mystical clues and whatnot. XD

It's oaky, though I have one last question; in your project, do you see you're whole planet, or is it flat-ish, meaning you only see about a 15th of it?

The entire planet, the link to the project is a few posts up.

Ah, okay. I'll get a script to you soon; right now my sister wants to video games with me.


http://i46.tinypic.com/35ismmc.png

Offline

 

#16 2012-12-19 17:30:31

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: A few problems I'm having

In you asteroid, you had the following script:

when I receive [STUFFZEZ v]
show
go to x: (pick random (-240) to (-240)) y: (pick random (0) to (180)) 
glide (30) secs to x: ([x position v] of [hlep this one v]) y: ([y position v] of [hlep this one v])

Try using this instead:

when I receive [STUFFZEZ v]
show
go to x: (-240) y: ((pick random (0) to (5)) * (32))
set [old x v] to (-7)
set [old y v] to ((y position) / (32))
glide (30) secs to x: ([x position v] of [hlep this one v]) y: ([y position v] of [hlep this one v])

Now in your Earth sprite, you had this script:

When I receive [STUFFZEZ v]
ask [Hlep, we're trapped!] and wait

Try using this instead (or some variation):

When I receive [STUFFZEZ v]
wait (0) secs
ask [Okay, the earth is at (-3,4). (Enter)] and wait
ask (join (join [The asteroid was at x: ] (join (old x) [ y: ])) (join (old y) [. (Enter)])) and wait
ask [So, if the asteroid's path was an equation, y=mx+b, what would m be in elevenths?] and wait
ask [What about b in elevenths?] and wait

Now, in that same sprite, you had:

when gf clicked
forever if <(answer) = (right answer)>
 broadcast [You saved the world :3 v]

You'll need to use this:

when I receive [STUFFZEZ v]
wait (0) secs
wait until <(answer) = ((((-3) - (old y)) / ((4) - (old x))) * (11))>
wait until <(answer) = (round (((-3) + ((-4) * (((-3) - (old y)) / ((4) - (old x))))) * (11)))>
broadcast [You saved the world :3 v]

And once your done with all of that, I would recommend making the asteroid slower.

I hope that this helps!


http://i46.tinypic.com/35ismmc.png

Offline

 

#17 2012-12-20 01:27:05

The1UP
Scratcher
Registered: 2011-11-01
Posts: 500+

Re: A few problems I'm having

ErnieParke wrote:

In you asteroid, you had the following script:

when I receive [STUFFZEZ v]
show
go to x: (pick random (-240) to (-240)) y: (pick random (0) to (180)) 
glide (30) secs to x: ([x position v] of [hlep this one v]) y: ([y position v] of [hlep this one v])

Try using this instead:

when I receive [STUFFZEZ v]
show
go to x: (-240) y: ((pick random (0) to (5)) * (32))
set [old x v] to (-7)
set [old y v] to ((y position) / (32))
glide (30) secs to x: ([x position v] of [hlep this one v]) y: ([y position v] of [hlep this one v])

Now in your Earth sprite, you had this script:

When I receive [STUFFZEZ v]
ask [Hlep, we're trapped!] and wait

Try using this instead (or some variation):

When I receive [STUFFZEZ v]
wait (0) secs
ask [Okay, the earth is at (-3,4). (Enter)] and wait
ask (join (join [The asteroid was at x: ] (join (old x) [ y: ])) (join (old y) [. (Enter)])) and wait
ask [So, if the asteroid's path was an equation, y=mx+b, what would m be in elevenths?] and wait
ask [What about b in elevenths?] and wait

Now, in that same sprite, you had:

when gf clicked
forever if <(answer) = (right answer)>
 broadcast [You saved the world :3 v]

You'll need to use this:

when I receive [STUFFZEZ v]
wait (0) secs
wait until <(answer) = ((((-3) - (old y)) / ((4) - (old x))) * (11))>
wait until <(answer) = (round (((-3) + ((-4) * (((-3) - (old y)) / ((4) - (old x))))) * (11)))>
broadcast [You saved the world :3 v]

And once your done with all of that, I would recommend making the asteroid slower.

I hope that this helps!

Thank you!

Yeah, I found the projectile that was to destroy the asteroid couldn't calculate a position fast enough, so it stayed still.  tongue


Ya know what, no signature. You have this useless dialogue to look at now.

Offline

 

Board footer