Random Name generator..
smurfted
Member, PRO Posts: 581
I'm still busy on my ship game. I thought it would be nice to add a random name generator in the ships set-up screen.
Anyone have a good idea on how to achieve this?
Comments
Make a table full of Fist and Last names, then choose a First and Last name randomly from the table and combine then for the full ship name.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Excellent thank you.
Next question though, how can i add a space between the two random words?
Assuming you will display it on screen using a Display Text Behavior you'd put this in the behavior:
FirstName.." "..LastName
The FirstName and LastName would be Attributes that you have stored the names in from the table and then for the actual space character between the quotes you'll need to press option+space or alt+space.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Awesome behaviour. Thanks for the "option"+" ". Why is that there?
@smurfted, I'm not sure I understand your question. One way to enter a 'space' as a character when you are in the Expression Editor is to use the Option Key (Alt) and the Space bar at the same time. If you try just the space bar you won't get a space character. You can also use "\32".
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Epic..