
-----------------------------------
Zasalamel
Fri Dec 18, 2009 4:37 pm

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)




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

-----------------------------------
Tony
Fri Dec 18, 2009 5:13 pm

RE:help with mouse effects
-----------------------------------
you can trying using a [tdoc]delay[/tdoc]

-----------------------------------
Zasalamel
Fri Dec 18, 2009 5:25 pm

RE:help with mouse effects
-----------------------------------
Where exactly? ive tried it and it doesn't seem to work

-----------------------------------
TheGuardian001
Fri Dec 18, 2009 6:02 pm

Re: help with mouse effects
-----------------------------------
Putting it anywhere inside the loop seems to work fine for me...

-----------------------------------
Zren
Fri Dec 18, 2009 6:47 pm

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?

-----------------------------------
Zasalamel
Sat Dec 19, 2009 2:55 pm

RE:help with mouse effects
-----------------------------------
yes i am talking about the distance between the dots.

-----------------------------------
Zren
Sat Dec 19, 2009 6:58 pm

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?

-----------------------------------
Zasalamel
Sat Dec 19, 2009 7:16 pm

RE:help with mouse effects
-----------------------------------
That's what im here for help with.

-----------------------------------
i'm not sure
Tue Dec 22, 2009 10:31 pm

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 %