kaanguyr

Eurobricks New Members
  • Content Count

    5
  • Joined

  • Last visited

About kaanguyr

Profile Information

  • Gender
    Male
  • Location
    Badalona, Catalunya

Extra

  • Country
    Spain
  1. OK. Thanks, Philo. I'll put a new PC on my Christmas gift list.
  2. Hello Roland. It's me again. As you can see I'm learning LUA applied to LDCad in an intensive manner. It's something like "LUA - From Dummy to Expert in One Week" Now, there is a new question: What Does the following error message mean? Playback is to slow for 25 fps at an avg frame time of 45.77ms. I got it just viewing one of your examples without changing anything, [5580.mpd and the corresponding .lua] and others. Playing a little with my files I get the same error (time (ms) changes, offcourse), specially with more "complex" models. i.e.: Nothing to note with very simple models (a few parts), but error with the 42039.mpd trying to open the doors or the rear. I've read all the documentation before writing this post, I promise. Thanks to you in advance, as usual.
  3. Yeah!!!, You got it!. It was the.ldr in the GetRef line. I presumed it was the block name, not the filename. Thank you. I owe you a postcard.
  4. Ooooops! I feel so stupid! So many times I reread the script without realizing the typing error: 'axel1' instead of 'axle1'. I corrected the mistyping and here you are: Same Error. There must be a 'newbie' error, I know, but I'm lost. That's the reason I reduced the example to your variables set, and to only one axe: simplicity. Don't mind the matrix. I forget always which set of zeroes goes with a specific axle. I always solve it by 'try & error' (an a reread of your notes about LDCad) Thanks for your patience and quick answer, The script is unchanged, The modet now is: 0 FILE main.ldr 0 Author: Conrad G.-Anleo 0 !LDCAD SCRIPT [source=animation2.lua] 1 16 0 0 0 1 0 0 0 1 0 0 0 1 axle1.ldr 0 FILE axle1.ldr 0 Author: Conrad G.-Anleo 1 7 0 0 0 0 1 0 0 0 -1 -1 0 0 32073.dat 1 14 0 0 0 1 0 0 0 1 0 0 0 1 32072.dat
  5. Hi there. I'm a one-year LDcad user and now a newbie with LUA and animation. I use LDcad v1.5 on Ubuntu 16.4 LTS. I have reproduced the example in the Roland Merkel Youtube, simplified it and, after some time to struggle, I have an error "Active refline link needed" in the line reading ax1:setOri(ori). I consulted the Message error script console ldcad1.5 topic in the LDraw forum, but this is not the case, and there is no information about LUA in the Internet. I send the animation2.mpd and the .lua files for examination. All seems to be in order, but nothing happens. Any suggestion? Thanks in advance for your help. =========== animation2.mpd =========================== 0 FILE main.ldr 0 Author: Conrad G.-Anleo 0 !LDCAD SCRIPT [source=animation2.lua] 1 16 0 0 0 1 0 0 0 1 0 0 0 1 axel1.ldr 0 FILE axel1.ldr 0 Author: Conrad G.-Anleo 1 7 0 0 0 0 1 0 0 0 -1 -1 0 0 32073.dat 1 14 0 0 0 1 0 0 0 1 0 0 0 1 32072.dat ========== animation2.lua ================= --[[ animation2.lua (c) Conrad G.-Anleo ]] function register() local ani=ldc.animation('demo') ani:setLength(20) ani:setEvent('frame', 'onFrame') end function onFrame() local ani=ldc.animation('demo') local mainSf=ldc.subfile() local ori=ldc.matrix() local angle=-4*360*ani:getFrameTime()/ani:getLength() local ax1=mainSf:getRef('axle1') ori:setRotate(angle, 1, 0, 0) ax1:setOri(ori) end register() ============= END ==============================