Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: rand0m on February 02, 2019, 01:05:18 PM

Title: Anyway to Auto-generate Shuffle (plugin) List Size
Post by: rand0m on February 02, 2019, 01:05:18 PM
Hi currently I am using the Shuffle Plugin as follows:
Code: [Select]
local list = [];
list.push(fe.add_text("[Title]", 120, 400, 400, 60));
list.push(fe.add_text("[Title]", 120, 480, 400, 60));
list.push(fe.add_text("[Title]", 120, 560, 400, 60));
list.push(fe.add_text("[Title]", 120, 640, 400, 60));
list.push(fe.add_text("[Title]", 120, 720, 400, 60));

Is there anyway I can auto-generate Shuffle "local list = [];" by linking it with magic token [ListSize]? So there are no hardcoded slots but slots are generated according to the items in a romlist.
Title: Re: Anyway to Auto-generate Shuffle (plugin) List Size
Post by: keilmillerjr on February 02, 2019, 01:10:39 PM
Create a for loop based on list size. You will need to recreate the class each time your list changes.