Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
3,006
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. @name Digiscreen
  2. @inputs DS:wirelink
  3. @persist Res X Y
  4. if(first()){
  5. function wirelink:initScreen(Res){
  6. This[1048574]=0 #Reset Screen and whatever was on it will be cleared.
  7. This[1048569]=3 #Set color mode to 3
  8. This[1048575]=1 #Apply changes
  9. This[1048572]=Res #Set new resolution on Y (Height)
  10. This[1048573]=Res #Set new resolution on X (Width)
  11. }
  12. function wirelink:drawPixel(X,Y,Color:vector,Res){
  13. This[X+Y*Res]=rgb2digi(Color,3)
  14. }
  15. Res=32
  16. DS:initScreen(Res)
  17. runOnTick(1)
  18. }
  19. #interval(100) #Every 100ms screen will draw new pixel
  20.  
  21. DS:drawPixel(X,Y,randvec(0,255),Res) #Draws random color in to cell
  22.  
  23. X++
  24.  
  25. if(X==32){X=0,Y++} #If X on the edge, go lower
  26. if(Y==32){Y=0} #If Y at the bottom, reset
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement