I'm Making A Project, And I Need Help With Something. On The Menu, Theres A Small Square Robot. Its Supposed To:
1. Follow The Mouse. (DONE. Thanks Sep!)
2. Spin Around. (DONE. Thanks Sep!)
3. Not Be Able To Go Through Walls. (DONE. Thanks Sep!)
4. A Script That Measures How Fast The Mouse Is Moving. (Must Store Information Into A Variable.) (DONE. Thanks ScratchReallyRocks!)
Can Somebody Give Me The Scripts I Would Use? Thanks.
EDIT: I Decided To Make This A 1s1s. I Crammed All My Scripts Together And Have A Huge One Now. Prepare For One Of The Best 1s1s Projects Ever!
Last edited by TheGameMaster1231 (2010-06-13 08:31:03)
Offline
when green flag clicked
forever
set last x to x position
set last y to y position
if mouse x < x postition
change x position by -1
else
if mouse x > x position
change x position by 1
if mouse y < y postition
change y position by -1
else
if mouse y > y position
change y position by 1
turn < 15 degrees
if touching color [wall color]
go to x: last x y: last y
Offline
SeptimusHeap wrote:
when green flag clicked
forever
set last x to x position
set last y to y position
if mouse x < x postition
change x position by -1
else
if mouse x > x position
change x position by 1
if mouse y < y postition
change y position by -1
else
if mouse y > y position
change y position by 1
turn < 15 degrees
if touching color [wall color]
go to x: last x y: last y
Thanks, But I Was Thinking More Like A Gravitational Movement. (Sorta Like The Friction Marble...)
EDIT: Nevermind. I Used Both Your Script And The Friction Marble's Script And I Got It To Work!
Last edited by TheGameMaster1231 (2010-06-12 19:50:33)
Offline
Ok, I Need Something Else Now: I Need A Script That Measures How Fast The Mouse Is Moving. (It Needs To Store The Information Into A Variable.)
If Anyone Can Make This Scrpit, Then Please Tell Me!
Offline
TheGameMaster1231 wrote:
Ok, I Need Something Else Now: I Need A Script That Measures How Fast The Mouse Is Moving. (It Needs To Store The Information Into A Variable.)
If Anyone Can Make This Scrpit, Then Please Tell Me!![]()
What do you want to measure it in? Because I bet I can do it...
Last edited by ScratchReallyROCKS (2010-06-12 20:28:08)
Offline
ScratchReallyROCKS wrote:
TheGameMaster1231 wrote:
Ok, I Need Something Else Now: I Need A Script That Measures How Fast The Mouse Is Moving. (It Needs To Store The Information Into A Variable.)
If Anyone Can Make This Scrpit, Then Please Tell Me!![]()
What do you want to measure it in? Because I bet I can do it...
I did it. It measures in pps (pixels per second) here it is. Un unfortunately the variable shows up in the wrong place online. Oh well, it works
Offline