Nice, but it could e done without all those 'Tick comaprestuffhere -> Y=somenumber's.
I'll write one with intervals or schedules when it's not 4AM.
Been done a few times but noone seems to have made a post about theirs so heres one for ya: (pics later)
N@Scanner[Beta]
I@Pulser Range Button
O@Ticktime Xs Ys Gs Xr Yr Run Percent
Ticktime=0.08
Button == 0 & Tick == 0 -> Run = 0;
Button == 1 | Tick > 0 -> Run = 1;
Gs=255-Range
Ys=Y
Xr=(Xs/16)-1
Yr=(Ys/16)-1
Xs=31+(Tick-(32*Ys))
Percent = floor((Tick/1024)*100)
Run == 1 ->
~Pulser&Pulser -> Tick+=1;
Tick > 0 & Tick <= 32 -> Y=1;
Tick > 32 & Tick <= 64 -> Y=2;
Tick > 64 & Tick <= 96 -> Y=3;
Tick > 96 & Tick <= 128 -> Y=4;
Tick > 128 & Tick <= 160 -> Y=5;
Tick > 160 & Tick <= 192 -> Y=6;
Tick > 192 & Tick <= 224 -> Y=7;
Tick > 224 & Tick <= 256 -> Y=8;
Tick > 256 & Tick <= 288 -> Y=9;
Tick > 288 & Tick <= 320 -> Y=10;
Tick > 320 & Tick <= 352 -> Y=11;
Tick > 352 & Tick <= 384 -> Y=12;
Tick > 384 & Tick <= 416 -> Y=13;
Tick > 416 & Tick <= 448 -> Y=14;
Tick > 448 & Tick <= 480 -> Y=15;
Tick > 480 & Tick <= 512 -> Y=16;
Tick > 512 & Tick <= 544 -> Y=17;
Tick > 544 & Tick <= 576 -> Y=18;
Tick > 576 & Tick <= 608 -> Y=19;
Tick > 608 & Tick <= 640 -> Y=20;
Tick > 640 & Tick <= 672 -> Y=21;
Tick > 682 & Tick <= 704 -> Y=22;
Tick > 704 & Tick <= 736 -> Y=23;
Tick > 736 & Tick <= 768 -> Y=24;
Tick > 768 & Tick <= 800 -> Y=25;
Tick > 800 & Tick <= 832 -> Y=26;
Tick > 832 & Tick <= 864 -> Y=27;
Tick > 864 & Tick <= 896 -> Y=28;
Tick > 896 & Tick <= 928 -> Y=29;
Tick > 928 & Tick <= 960 -> Y=30;
Tick > 960 & Tick <= 992 -> Y=31;
Tick > 992 & Tick <= 1024 -> Y=32;
Tick > 1024 -> Tick = 0;;
#End
Had to post quickly for "various" reasons
Nice, but it could e done without all those 'Tick comaprestuffhere -> Y=somenumber's.
I'll write one with intervals or schedules when it's not 4AM.
i know its not exactly the best code in the world, its still in beta
but i had to "push" a release because of [sK]Danny using a nail exploit to steal a dupe of it and then claiming it was his until i totally pwnt him with shit loads of proof...
Anyway.. if you want to wire it up:
Xs, Ys and Gs all represent outputs for the screen
Xr and Yr are outputs to the ranger to change its focus point
The button needs to be non toggled
Ticktime can be up to you.. but this is a good balance between speed and quality
percent-shows how far into a scan you are
Run is to the pulser
well you get the idea.. its not too difficult
Code:N@SH Camera I@Button Range O@Xr Yr Xs Ys Gs Run Percent interval(50) Button -> Run = 1; Run & clk() -> X = (X<=32?X+1:0), Y += (X == 0? 1:0), Y > 32 -> Run = 0, X = 0, Y = 0;, Gs = clamp(255-Range,0,255); Xr = (X/16)-1 Yr = (Y/16)-1 Xs = X-1 Ys = Y-1 Percent = (Y*32+X)/1024*100
Everything can be improved upon. Nothing is Perfect.
The only way to move forward, is to surpass what has already been done.
Creator of many things.
lol, nice code but then im not that godly at wiremod
i just try to keep up with the baiscs, and i should probably try and learn the more advanced parts too![]()
better get started![]()
The main difference is that you only used 1 loop, while I used 2.
And also I used the internal clock while you used an external pulser.
Everything can be improved upon. Nothing is Perfect.
The only way to move forward, is to surpass what has already been done.
Creator of many things.
This is my code for a scanner that does a cube and outputs to an emitter. you can alter the size of that cube with the max value. it uses a hydralic mechanism to move the ranger
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>n@scanner
I@Clk Start Reset Max Ranger
O@X Y Z Working
Start==1 -> Working=1;
Clk==1 -> Z=Ranger/Max X+=1;
X>=Max -> Y+=1 X=0;
Y>=Max -> Working=0;
Reset==1 -> Working=0 X=0 Y=0 Z=0;</div>
"Equality only works if everyone has it" - NR, aka BLE
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>N@Camera
I@Timer On Dist
O@ScrX ScrY ScrG RangX RangY Run Reset
On==1->Run=1,Reset=0;Timer>=64->Run=0,Reset=1;
ScrX=floor(Timer%2*16)
ScrY=floor(Timer%64/2)
ScrG=1000-Dist
RangX=ScrX/16-1
RangY=ScrY/16-1</div>
![]()
(\_/) <- Bunny
(O.ô) Copy Bunny into your sig to help
(> <) him on his way to world domination.
<div class='codemain' style='height:200px;white-space<div class='codetop'>CODEre;overflow:auto'>N@Camera
I@Timer On Dist
O@ScrX ScrY ScrG RangX RangY Run Reset
On==1->Run=1,Reset=0;Timer>=64->Run=0,Reset=1;
ScrX=floor(Timer%2*16)
ScrY=floor(Timer%64/2)
ScrG=1000-Dist
RangX=ScrX/16-1
RangY=ScrY/16-1</div>
[/b][/quote]
I used this code to build a scanner that outputs its findings through an emitter. i used the internal clock (interval) to make it faster and I added some other code so that it can be way more accurate (if you for example use very small units for the ranger beam's movement you get a very detailed image through the emitter, though it takes very long then).
my only problem still is that the ranger outputs the distance in a kind of circle around itself, and if you put that to the emitter which draws the whole thing rectangular, the image is a bit unproportional. for example the plain ground very close to the ranger seems to be a high mountain in the emitted image...
i tried to compensate this effect with the use Pythagoras' theorem, but the problem is that the ranger's direction is not using the same values (units) as the distance does. the ranger's movement is controlled by values from -1 to +1 if i got that right, therfore you can't get the needed values to calculate the distance correctly. can anyone help me out in this point?
Bookmarks