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

#1 2009-10-02 23:58:44

floatingmagictree
Scratcher
Registered: 2008-10-21
Posts: 1000+

Sticking question, needed for collab with pinochio.

Hai guise, I need to know a good script (THAT WORKS, I know all you posers out there) so a certain sprite can stick on a wall that is above you if you click in that direction.

FOR ALL THOSE WHO GO TO NITROME OFTEN, THIS GAME WILL BE BASED ON ROCKITTY

So, can you tell me? And this is for a collaboration project with pinochio.

Offline

 

#2 2009-10-03 09:15:59

floatingmagictree
Scratcher
Registered: 2008-10-21
Posts: 1000+

Re: Sticking question, needed for collab with pinochio.

Bump

Offline

 

#3 2009-10-03 14:32:22

floatingmagictree
Scratcher
Registered: 2008-10-21
Posts: 1000+

Re: Sticking question, needed for collab with pinochio.

bump

Can a mod move this to Advanced Topics please?

Offline

 

#4 2009-10-03 14:56:30

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: Sticking question, needed for collab with pinochio.

Well...

I imagine this script would work:

Code:

[When flag clicked]
[forever]
[wait until <mouse down?>]
[point towards [mouse-pointer]]
[repeat until <touching [Wall]>]
[][move (2) steps]
[end repeat]
[point in direction (round ((direction) / (90))) * (90))]

This would only work if you had walls that were all perpendicular or parallel...

Obviously that would have to be completely reformatted for scrolling...

Last edited by The-Whiz (2009-10-03 14:58:48)

Offline

 

#5 2009-10-03 15:02:21

floatingmagictree
Scratcher
Registered: 2008-10-21
Posts: 1000+

Re: Sticking question, needed for collab with pinochio.

The-Whiz wrote:

Well...

I imagine this script would work:

Code:

[When flag clicked]
[forever]
[wait until <mouse down?>]
[point towards [mouse-pointer]]
[repeat until <touching [Wall]>]
[][move (2) steps]
[end repeat]
[point in direction (round ((direction) / (90))) * (90))]

This would only work if you had walls that were all perpendicular or parallel...

Obviously that would have to be completely reformatted for scrolling...

That's not going to work though.

Go to Nitrome, one of their newer games are called Rockitty. That will give you a basic idea.

Offline

 

#6 2009-10-03 15:19:37

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: Sticking question, needed for collab with pinochio.

I know, I've already seen Rockitty.

Offline

 

#7 2009-10-03 21:52:15

weissjd
Scratcher
Registered: 2007-05-16
Posts: 64

Re: Sticking question, needed for collab with pinochio.

I took a look at Rockitty. If you're trying to do something like having the sprite bounce around until it hits a certain color (like the gooey pink in the game), you could try this:

Script for the stage:

When Stage clicked
  Broadcast [StageClick]

For the sprite:

When I receive [StageClick]
  point toward [mousepointer]
  move [20] steps  (this moves the sprite off the color)
  repeat until touching color [your gooey pink]
    move 5 steps
    if on edge, bounce

Offline

 

#8 2009-10-04 02:04:26

MyRedNeptune
Community Moderator
Registered: 2007-05-07
Posts: 1000+

Re: Sticking question, needed for collab with pinochio.

Moving to Advanced Topics. ^^


http://i52.tinypic.com/5es7t0.png I know what you're thinking! "Neptune! Get rid of those filthy advertisements and give us back the Zarathustra siggy, you horrible person!" Well, don't worry about it, the Zara siggy will be back soon, new and improved! ^^ Meanwhile, just do what the sig tells you to. >.>

Offline

 

#9 2009-10-04 08:43:11

floatingmagictree
Scratcher
Registered: 2008-10-21
Posts: 1000+

Re: Sticking question, needed for collab with pinochio.

MyRedNeptune wrote:

Moving to Advanced Topics. ^^

http://t1.gstatic.com/images?q=tbn:GpztLDidIB_uMM:http://blog.gaijinstore.com/wp-content/uploads/2008/06/lol-face.gif

Offline

 

Board footer