406
Themes / Re: Put a random icon on the screen.
« on: May 17, 2018, 07:50:02 AM »I created a random function.
https://github.com/keilmillerjr/helpers-module/blob/master/readme.md
Pass array length. It return number. Use it as index in array to update image on your transition.
Okay thank you very much.
But, I'm not an expert programmer.
I tried this, but it does not work for me:
Code: [Select]
fe.load_module( "module-master" );
// Posters
local my_film = randInt(6);
local film = fe.add_image("posters/films/[my_film].png", 0, 0, flw*0.4, flh*0.3);
film.preserve_aspect_ratio = true;
film.trigger = Transition.EndNavigation;
Being 1.png, 2.png, etc. my film icons.
And I do not know what I'm doing wrong ... I'm sorry.
Edit:
The module.nut I downloaded it from here:
://github.com/keilmillerjr/helpers-module
I have copied the module "module.nut" in "E:\arcade\attract\ modules", renaming it "module-master.nut".