Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: kent79 on May 25, 2016, 05:23:07 AM
-
Hi All,
I am writing a new theme and facing a issues on Reflection. I would like to create reflect effect for each flyer. But I don't know how to write the code. Please help me.
1. Below code sample can create single flyer with reflection, but I don't know how to combine into "conveyor" module.
local surfacer = fe.add_surface( flw*0.145, flh*0.35 );
local flyerr = surfacer.add_artwork( "flyer", 0, 0, flw*0.145, flh*0.35 );
flyerr.preserve_aspect_ratio = true;
// position the surface
//
surfacer.set_pos( flx*0.642, fly*0.1, flw*0.145, flh*0.35 );
// now create a reflection of the surface
//
local reflect = fe.add_clone( surfacer );
reflect.subimg_y = reflect.texture_height;
reflect.subimg_height = -reflect.texture_height;
reflect.set_rgb( 40, 40, 40 );
// position the reflection
//
reflect.set_pos( flx*0.496, fly*0.97, flw*0.146, flh*0.35 );
-
Is there any update on this ?