7
« on: February 05, 2020, 08:00:14 PM »
If you find a 3D room builder that you like, let me know - I'd definitely like to try my hand at that.
There is code for music if you just wanted to include a music folder within your layout folder. I have ambient music that plays for all of attract mode. I set it up awhile back so I'd have to go through my notes to see how I did that. On top of the AM music, I had worked on a theme with takoni and Yaron where music was incorporated into the layout itself. We had a music folder within the layout folder with various songs in it and once you went into, say, Super Nintendo then a random song from that folder would play.
Here is the most recent wheel list I have used. jedione helped me out a bunch with it. It is left vertical and semi-large. Put Part 1 at the beginning of your layout file just underneath the layout title and credits if you have them. Then put Part 2 somewhere in your layout (I don't think it matters):
///////////////PART 1
# systemwheel
local systemwheel = fe.add_artwork("wheel", flx*0.86, fly*0.01, flw*0.13, flh*0.10);
systemwheel.preserve_aspect_ratio = true;
//background.trigger = Transition.EndNavigation;
////////////////PART 2
# wheel code for conveyor
local wheel_x = [ flx*0.78, flx*0.05, flx*0.78, -flx*0.32, flx*0.78, -flx*1.4255, flx*0.03, -flx*1.4255, flx*0.78, -flx*0.325, flx*0.78, flx*0.78, ];
local wheel_y = [ -fly*0.22, -fly*0.105, fly*0.0, fly*0.105, fly*0.215, fly*0.325, fly*0.436, fly*0.61, fly*0.72 fly*0.83, fly*0.935, fly*0.99, ];
local wheel_w = [ flw*0.18, flw*0.18, flw*0.18, flw*0.18, flw*0.18, flw*0.18, flw*0.20, flw*0.18, flw*0.18, flw*0.18, flw*0.18, flw*0.18, ];
local wheel_a = [ 80, 80, 80, 80, 100, 100, 255, 100, 100, 80, 80, 80, ];
local wheel_h = [ flh*0.11, flh*0.11, flh*0.11, flh*0.11, flh*0.11, flh*0.11, flh*0.13, flh*0.11, flh*0.11, flh*0.11, flh*0.11, flh*0.11, ];
local wheel_r = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ];
local num_arts = 6;
class WheelEntry extends ConveyorSlot
{
constructor()
{
base.constructor( ::fe.add_artwork( my_config["wheel"] ) );
}
function on_progress( progress, var )
{
local p = progress / 0.1;
local slot = p.tointeger();
p -= slot;
slot++;
if ( slot < 0 ) slot=0;
if ( slot >=10 ) slot=10;
m_obj.x = wheel_x[slot] + p * ( wheel_x[slot+1] - wheel_x[slot] );
m_obj.y = wheel_y[slot] + p * ( wheel_y[slot+1] - wheel_y[slot] );
m_obj.width = wheel_w[slot] + p * ( wheel_w[slot+1] - wheel_w[slot] );
m_obj.height = wheel_h[slot] + p * ( wheel_h[slot+1] - wheel_h[slot] );
m_obj.rotation = wheel_r[slot] + p * ( wheel_r[slot+1] - wheel_r[slot] );
m_obj.alpha = wheel_a[slot] + p * ( wheel_a[slot+1] - wheel_a[slot] );
}
};
local wheel_entries = [];
for ( local i=0; i<num_arts/2; i++ )
wheel_entries.push( WheelEntry() );
local remaining = num_arts - wheel_entries.len();
for ( local i=0; i<remaining; i++ )
wheel_entries.insert( num_arts/2, WheelEntry() );
local conveyor = Conveyor();
conveyor.set_slots( wheel_entries );
conveyor.transition_ms = 0;
try { conveyor.transition_ms = my_config["transition_ms"].tointeger(); } catch ( e ) { }
I hope this helps!