This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
goldensecret's profile picture

getting a monitor to show an animation

Started by goldensecret, 28 February 2014 - 10:19 PM
goldensecret #1
Posted 28 February 2014 - 11:19 PM
yo, i am looking to make a blinking eye in an animation on my monitor, but the problem is that i don't know how. i was looking at doing it with npaint pro's .nfa file, which for the unknowing is a animation file with that program.

http://www.computercraft.info/forums2/index.php?/topic/5029-145-npaintpro/

if theres a way to do it with his program that would be wonderful, but if not, meh. i don't really mind, as long as i don't have to make it out of number and or letters, in the shape i want, im happy,

any help appreciated, thanks for the awesome community!
CometWolf #2
Posted 28 February 2014 - 11:24 PM
Idk bout using npp's animation files elsewhere, but you could just draw each frame of the animation as a regular picture and then load them in a loop.
goldensecret #3
Posted 02 March 2014 - 03:33 PM
Idk bout using npp's animation files elsewhere, but you could just draw each frame of the animation as a regular picture and then load them in a loop.
and how would i go about this? i am brand new to CC and any programming language. i can draw my image, but how would i load them in a loop on a screen?
Thib0704 #4
Posted 02 March 2014 - 05:24 PM
Idk bout using npp's animation files elsewhere, but you could just draw each frame of the animation as a regular picture and then load them in a loop.
and how would i go about this? i am brand new to CC and any programming language. i can draw my image, but how would i load them in a loop on a screen?

monitor = "back"
local anim = fs.list("/img/")
term.redirect(peripheral.wrap(monitor))
while true do
    for k,v in pairs(anim) do
		 local img = paintutils.loadImage("/img/" .. v)
		 paintutils.drawImage(img, 1,1)
    end
end

Should work.
Just put the images in "/img/"
In order (1. 2. 3. 4.)