String. Drag the blue dot around and the other dots will follow like a string. :D
;String 1.02
;Made by BlueThen on May 10, 2008.
;To install, paste this script into your remotes (alt + r),
;then type /string or right click the channel or status to open.
;Drag the blue dot.
alias String window -paoCzdk0 +tnbL @string -1 -1 400 400 | window -poCzdhk0 +tnbL @string.buf -1 -1 800 800 | string.init
on *:close:@string: { window -c @string.buf | unset %string.x %string.h }
alias -l string.init {
%string.x = 20 | drawfill @string.buf 0 0 1 1
drawtext @string.buf 1 Tahoma 40 237 25 Made by Bluethen | drawtext @string.buf 1 Tahoma 40 281 75 bluethen.com
while (%string.x) {
hadd -m x %string.x $calc(150 + (%string.x * 25)) | hadd -m y %string.x 400
drawdot @string.buf $iif(%string.x == 1,12,1) 10 $calc(150 + (%string.x * 25)) 400 | dec %string.x
}
drawcopy -m @string.buf 0 0 800 800 @string 0 0 400 400
}
menu channel,status {
String: { String }
}
menu @string {
sclick: { if ($sqrt($calc((($mouse.x * 2) - $hget(x,1))^2 + (($mouse.y * 2) - $hget(y,1))^2)) < 10) set %string.h y }
uclick: { set %string.h n }
leave: { set %string.h n }
mouse: {
if (%string.h == y) {
clear @string.buf | drawfill @string.buf 0 0 1 1
drawtext @string.buf 1 Tahoma 40 237 25 Made by Bluethen | drawtext @string.buf 1 Tahoma 40 281 75 bluethen.com | %string.x = 1
while (%string.x <= 20) {
if (%string.x == 1) {
hadd -m x 1 $calc($mouse.x * 2) | hadd -m y 1 $calc($mouse.y * 2) | if ($hget(x,1) > 760) hadd -m x 1 760 | if ($hget(x,1) < 40) hadd -m x 1 40
if ($hget(y,1) > 720) hadd -m y 1 720 | if ($hget(y,1) < 40) hadd -m y 1 40 | drawdot @string.buf 12 10 $hget(x,1) $hget(y,1)
}
else {
hadd -m x %string.x $calc($hget(x, $calc(%string.x - 1)) + (25 * $cos($getangle2($hget(x, $calc(%string.x - 1)),$hget(y, $calc(%string.x - 1)),$hget(x, %string.x),$hget(y, %string.x))).deg))
hadd -m y %string.x $calc($hget(y, $calc(%string.x - 1)) + (25 * $sin($getangle2($hget(x, $calc(%string.x - 1)),$hget(y, $calc(%string.x - 1)),$hget(x, %string.x),$hget(y, %string.x))).deg))
drawdot @string.buf 1 10 $hget(x, %string.x) $hget(y, %string.x)
}
inc %string.x
}
drawcopy -m @string.buf 0 0 800 800 @string 0 0 400 400
}
}
}
alias getangle2 {
%p1.x = $1 | %p1.y = $2 | %p2.x = $3 | %p2.y = $4 | %p3.x = %p2.x | %p3.y = %p1.y | %opposite = $sqrt($calc((%p2.x - %p3.x)^2 + (%p2.y - %p3.y)^2))
%hypotenuse = $sqrt($calc((%p2.x - %p1.x)^2 + (%p2.y - %p1.y)^2)) | %angle = $asin($calc( %opposite / %hypotenuse )).deg
if (%p1.y < %p2.y) %angle = $calc(360 - %angle) | if ((%p1.x > %p2.x) && (%p1.y > %p2.y)) %angle = $calc(180 - %angle)
elseif ((%p1.x > %p2.x) && (%p1.y < %p2.y)) %angle = $calc(180 +(360 - %angle)) | return $iif($calc(360 - %angle) == 360,0,$v1)
}
Fixed the border thing.
I really have nothing I can do for the last dots, in the script, the closer dots to the red one is effect more than the dots farther away. So the ones at the end may seem like they\'re stuck.
I\'ve been trying to release as many scripts as possible, but school\'s been getting in the way, and concepts are hard to find.
Ok cool idea but it looks like the last 3 or 4 dots are sticking an not followin a clean line instead they stick hard an move at a sharp angle instead if your moving in a soft arc.Alho i got it stuck on the boarder as well i wanted to see the limits so i draged it to the bottom edge an it got stuck,the red dot went passed the boarder an i couldn\'t retrieve it see if you can make it stop at the picwin edges maybe its a nice concept as well an one of your longer codes as well nice work BT.`-.-´