TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
show random list items (but only once)
Pages:
1
show random list items (but only once)
Romanius2
Posts: 8
August 16, 2017, 12:51:29 am
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
August 16, 2017, 12:58:51 am
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
August 16, 2017, 01:19:25 am
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
August 16, 2017, 01:42:59 am
Good thinking. And good luck! :-)
Romanius2
Posts: 8
August 16, 2017, 11:00:34 am
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
August 16, 2017, 11:08:32 am
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
August 16, 2017, 11:10:39 am
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
August 16, 2017, 11:50:13 am
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
October 23, 2017, 02:17:36 pm
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.
Pages:
1