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
Bump
Offline
bump
Can a mod move this to Advanced Topics please?
Offline
Well...
I imagine this script would work:
[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
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
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
Moving to Advanced Topics. ^^
Offline
MyRedNeptune wrote:
Moving to Advanced Topics. ^^
Offline