show random list items (but only once)

Romanius2

  • Posts: 8
Hello :)
I have a list with about 100 items in it and everytime the scene reloads an random items is displayed.

Now it would be great if the displayed items wont be displayed again. If every item was displayed, it should start with all items again.

Has anybody an idea?


gplar

  • Posts: 1115
Make a copy of the list to work on.
In this copy you remove the item as it is shown, then on next pick it is not available.
You will have to base your random pick on number of items in list.
This only works if you ar sure you will not run out of items in the list. :-)

Romanius2

  • Posts: 8
good idea, i will try it

if the list contains no more items, i could do another copy and begin again.

Thanks :)

gplar

  • Posts: 1115
Good thinking. And good luck! :-)

Romanius2

  • Posts: 8
It works :)
The new problem is that the copied list cant show umlauts (ä,ö,ü) so if there was before a "Wörter" it shows now "Wrter" :(

Anybody knows why and how to solve this?

Luyren

  • *
  • Posts: 2805
If your original list also can't display them, you might have to create your own font to display umlauts. I think that is a limitation of Stencyl's default font.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

Romanius2

  • Posts: 8
Thanks for your answer

My original list can display them, i have a font from StencylForge and added them with the included option custom text
Only the copied list can't show them...

Romanius2

  • Posts: 8
Strange.
I had to replace my attributes with game attributes, because i have to reload the scene. With normal attributes i can draw umlauts (ä,ö,ü) but it doesn't work with game attributes, the umlauts just disappear. Anybody an idea?

gplar

  • Posts: 1115
Sorry to be late about this, but I still use a workaround for Norwegian characters:
http://community.stencyl.com/index.php/topic,12188.msg72842.html#msg72842
It is a bit of work but gives what you want.