Choosing (and keeping) a random character form and name
actualchad
Member Posts: 1
Hello.
I'm testing out a randomly generating storybook for my kids, and I can't work out how to generate and retain information for characters etc.
I want to be able to show the character in a randomly generated form (rabbit, cow, duck, etc), and assign it a name (John, Steve, Morris), then display that information on the screen as text as well (eg: "My name is Morris and I am a rabbit.")
Secondly, I wanted to retain this form and name between scenes.
I've tried assigning attributes based on a table of names and forms, but how do I marry that up with an image that matches the form text, then get them to carry-over?
Thanks for any help,
Chad
Comments
Here you go, I haven't added notes as it should be simple enough.
Press the character to go to the next scene. (Notice the Control actor is only on the first scene)
Hope it helps
P.S Art is free to use as you wish!
OK, so you add the Attribute to the game as a whole, rather than the scene, then once it's assigned in the first scene, it stays the same throughout other scenes.
Sweet.
And if you call the image the same name as the text in the table, you can call it up using the table text as your variable?
Excellent.
Thanks a lot, Jeromy.
Chad
Hi,
You are correct, a game.attribute stays the same when going through scenes.
I think using a table is a lot more easy and efficient way of referencing what image and name to use. You are correct, as long as the image name matches the text.
Glad it was to some help,
Jeromy