help with mouse effects
Author |
Message |
Zasalamel
![](http://compsci.ca/v3/uploads/user_avatars/19672261044b2e9d570a198.jpg)
|
Posted: Fri Dec 18, 2009 4:37 pm Post subject: help with mouse effects |
|
|
What is it you are trying to achieve?
A better way to scroll the program down
What is the problem you are having?
scrolls to fast to get the require effect
Describe what you have tried to solve this problem
i have tried different ways;
put statements (put"",put skip,put" ")
locate(r,c)
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Turing: |
var x, y, z, a, b : int := 100
loop
Mouse.Where (x, y, z )
put ""
Draw.Line (x, y, a, b, black)
View.Update
a := x
b := y
end loop
|
Please specify what version of Turing you are using
V 4.0.5 and V 4.1.1
This took me about 5 minutes and i plan to expand it into a full mouse effects program |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
|
|
|
![](images/spacer.gif) |
Zasalamel
![](http://compsci.ca/v3/uploads/user_avatars/19672261044b2e9d570a198.jpg)
|
Posted: Fri Dec 18, 2009 5:25 pm Post subject: RE:help with mouse effects |
|
|
Where exactly? ive tried it and it doesn't seem to work |
|
|
|
|
![](images/spacer.gif) |
TheGuardian001
|
Posted: Fri Dec 18, 2009 6:02 pm Post subject: Re: help with mouse effects |
|
|
Putting it anywhere inside the loop seems to work fine for me... |
|
|
|
|
![](images/spacer.gif) |
Zren
![](http://compsci.ca/v3/uploads/user_avatars/1110053965512db6185954b.png)
|
Posted: Fri Dec 18, 2009 6:47 pm Post subject: RE:help with mouse effects |
|
|
delay(1) means your stopping for 1 millisecond.
delay(1000) means you stopping for 1 second.
Try delay(50)
Unless your talking about the distance between the lines? |
|
|
|
|
![](images/spacer.gif) |
Zasalamel
![](http://compsci.ca/v3/uploads/user_avatars/19672261044b2e9d570a198.jpg)
|
Posted: Sat Dec 19, 2009 2:55 pm Post subject: RE:help with mouse effects |
|
|
yes i am talking about the distance between the dots. |
|
|
|
|
![](images/spacer.gif) |
Zren
![](http://compsci.ca/v3/uploads/user_avatars/1110053965512db6185954b.png)
|
Posted: Sat Dec 19, 2009 6:58 pm Post subject: RE:help with mouse effects |
|
|
Well if you had any control over the font size of the console (height of the put statements) then this would be easily possible. However, you can't. Can you think of a way to achieve the same results without using put statements to scroll the screen? |
|
|
|
|
![](images/spacer.gif) |
Zasalamel
![](http://compsci.ca/v3/uploads/user_avatars/19672261044b2e9d570a198.jpg)
|
Posted: Sat Dec 19, 2009 7:16 pm Post subject: RE:help with mouse effects |
|
|
That's what im here for help with. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
i'm not sure
![](http://compsci.ca/v3/uploads/user_avatars/1725475884b326757d1b25.jpg)
|
Posted: Tue Dec 22, 2009 10:31 pm Post subject: Re: help with mouse effects |
|
|
I'm pretty sure you have to go in a different direction. Instead of using puts and lines try drawing dots, saving thier x positions in an array and then drawing them at a y position higher than before until you reach maxy it has the same affect but with adjustable distance between dots and none of those slashes across the screen.
Here's my code using that and it works pretty well. Oh and sorry the x isn't in a flexible array i've been looking into the tutorials and haven't got through them enough to understand yet.
setscreen ("offscreenonly")
loop
Mouse.Where (x, y, z)
for i : y .. maxy by 4 %<--------- change the 4 to change the distance between the dots.
drawdot (p (b) , i, black)
b += 1
end for
for decreasing i : 1000-1..1
p (i+1) := p (i)
end for
p (1):= x
b:= 1
View.Update
cls
end loop |
|
|
|
|
![](images/spacer.gif) |
|
|