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?
Offline
go to random position glide (num of secs) secs to x:([x position v] of [sprite v]) y:([y position v] of [sprite v])
Offline
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)
Offline
Mm, please explain the second problem in more detail.
Offline
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!
Offline
Tecklop wrote:
So whats the problem?
Pfft, forgot to say that.
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.
Offline
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?
Offline
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.
Never liked riddles or mystical clues and whatnot. XD
Offline
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.
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?
Offline
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.
Never liked riddles or mystical clues and whatnot. XDIt'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.
Offline
The1UP wrote:
ErnieParke wrote:
The1UP wrote:
Scripts for the project.
Never liked riddles or mystical clues and whatnot. XDIt'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.
Offline
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])
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])
When I receive [STUFFZEZ v] ask [Hlep, we're trapped!] and wait
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
when gf clicked forever if <(answer) = (right answer)> broadcast [You saved the world :3 v]
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]
Offline
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.
Offline