how can i make one dot stay there where was previously clicked
i am making something like: when you in windows xp (for example) hold left click on desktop and you drag there is a square, or something similar, which, when gets over an icon, make icon turn blue
i hope you understand what i am speaking about
please answer quickly
Last edited by dusski (2009-10-10 19:41:31)
Offline
Ok, you need these variables (Not including the parentheses):
(click x)
(click y)
(multiselect on)
And these sprites:
pen
icon
Pen script: [when flag clicked] [set [multiselect on] to [0]] [forever] [][wait until <mouse down?>] [][set [multiselect on] to [1]] [][set [click x] to (mouse x)] [][set [click y] to (mouse y)] [][repeat until <not <mouse down?>>] [][][clear] [][][go to x: (click x) y: (click y)] [][][pen down] [][][go to x: (click x) y: (mouse y)] [][][go to x: (mouse x) y: (mouse y)] [][][go to x: (mouse x) y: (click y)] [][][go to x: (click x) y: (click y)] [][][pen up] [][________________________________] [][set [multiselect on] to [0]] [_______] Icon script: [when flag clicked] [switch to costume [not selected]] [forever] [][wait until <(multiselect on) = [1]>] [][repeat until <(multiselect on) = [0]>] [][][if <<<<(click x) > (x position)> and <(mouse x) < (x position)>> or <<(click x) < (x position)> and <(mouse x) > (x position)>>> and <<<(click y) > (y position)> and <(mouse y) < (y position)>> or <<(click y) < (y position)> and <(mouse y) > (y position)>>>>] [][][][switch to costume [selected]] [][][else______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________] [][][][switch to costume [not selected]] [][][__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________] [][_____________________________________] [][wait until <mouse down>] [][switch to costume [not selected]] [_______]
Offline
If you are making a game using velocity, and it is simply moving around levels, what is the speed I should use. For example, would this be too fast or too slow or just right:
<change{ velocity }by( 1
<move( velocity )steps>Thanks.
Last edited by WeirdF (2009-10-11 01:56:11)

Offline
You seem to know everything! But you're a whiz, so that's expected...
Are there any tutorials for a four-sprite X and Y scroller with infinite area? People can do infinite X scrolling with two sprites, so people can probably do it for X and Y...
The type of scrolling I want is like the scrolling thing in Archknight's Adventure, but upgraded for X and Y four-sprite scrolling.
If you know how anyway, just tell me. Thanks!
Last edited by Jonathanpb (2009-10-11 02:09:10)
Offline
I said thanks and put the smiley BECAUSE I'M IN A GOOD MOOD!
Offline
Jonathanpb wrote:
You seem to know everything! But you're a whiz, so that's expected...
Are there any tutorials for a four-sprite X and Y scroller with infinite area? People can do infinite X scrolling with two sprites, so people can probably do it for X and Y...
The type of scrolling I want is like the scrolling thing in Archknight's Adventure, but upgraded for X and Y four-sprite scrolling.
If you know how anyway, just tell me. Thanks!![]()
This might help - It's not exactly what you want, but it can be customized to have gravity, etc.
WeirdF wrote:
If you are making a game using velocity, and it is simply moving around levels, what is the speed I should use. For example, would this be too fast or too slow or just right:
Code:
<change{ velocity }by( 1 <move( velocity )steps>Thanks.
The velocity changing is about right, but you also might want this script:
[change [velocity] by (1)] [if <(velocity) > (5)>] [][set [velocity] to [5]] [_____________________] [move (velocity) steps]
Staraptor wrote:
I need my ball to bounce in pong!
[when flag clicked] [go to x: (0) y: (0)] [set [x velocity] to (pick random (-5) to (5))] [set [y velocity] to (pick random (-5) to (5))] [forever] [][change x by (x velocity)] [][change y by (y velocity)[ [][if <<(x position) < ((-240) + (radius of ball))> or <(x position) > ((240) - (radius of ball))>>] [][][go to x: (0) y: (0)] [][][set [x velocity] to (pick random (-5) to (5))] [][][set [y velocity] to (pick random (-5) to (5))] [][________________________________________________________________________________________________] [][if <touching [left paddle]>] [][][set [x velocity] to ((x velocity) * (-1))] [][][set x to ((([x position] of [left paddle]) + ((width of paddle) / (2))) + (radius of ball))] [][___________________________] [][if <touching [right paddle]>] [][][set [x velocity] to ((x velocity) * (-1))] [][][set x to ((([x position] of [right paddle]) - ((width of paddle) / (2))) - (radius of ball))] [][___________________________] [][if <(y position) > ((180) - (radius of ball))>] [][][set [y velocity] to ((y velocity) * (-1))] [][][set y to ((180) - (radius of ball))] [][______________________________________________] [][if <(y position) < ((-180) + (radius of ball))>] [][][set [y velocity] to ((y velocity) * (-1))] [][][set y to ((-180) + (radius of ball))] [][______________________________________________] [_______]
Offline
The-Whiz wrote:
Ok, you need these variables (Not including the parentheses):
(click x)
(click y)
(multiselect on)
And these sprites:
pen
iconCode:
Pen script: [when flag clicked] [set [multiselect on] to [0]] [forever] [][wait until <mouse down?>] [][set [multiselect on] to [1]] [][set [click x] to (mouse x)] [][set [click y] to (mouse y)] [][repeat until <not <mouse down?>>] [][][clear] [][][go to x: (click x) y: (click y)] [][][pen down] [][][go to x: (click x) y: (mouse y)] [][][go to x: (mouse x) y: (mouse y)] [][][go to x: (mouse x) y: (click y)] [][][go to x: (click x) y: (click y)] [][][pen up] [][________________________________] [][set [multiselect on] to [0]] [_______] Icon script: [when flag clicked] [switch to costume [not selected]] [forever] [][wait until <(multiselect on) = [1]>] [][repeat until <(multiselect on) = [0]>] [][][if <<<<(click x) > (x position)> and <(mouse x) < (x position)>> or <<(click x) < (x position)> and <(mouse x) > (x position)>>> and <<<(click y) > (y position)> and <(mouse y) < (y position)>> or <<(click y) < (y position)> and <(mouse y) > (y position)>>>>] [][][][switch to costume [selected]] [][][else______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________] [][][][switch to costume [not selected]] [][][__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________] [][_____________________________________] [][wait until <mouse down>] [][switch to costume [not selected]] [_______]
I made something like that with 6 sprites.
Offline
Thanks!
Offline