Author Topic: Anyway to Auto-generate Shuffle (plugin) List Size  (Read 2022 times)

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Anyway to Auto-generate Shuffle (plugin) List Size
« 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.

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Anyway to Auto-generate Shuffle (plugin) List Size
« Reply #1 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.