Hi,
I'm working on a tactical game where you can choose several different characters for a team. I don't want to create a block of code for each character for every action, for instance, selecting the character with the mouse to put in your team.
I tried to putting all of the characters into a family and giving them all a "name" variable. So I can click on a character from the family, then pick it based on the comparison of the name, and then spawn a new one over in the team queue.
The pick seems to work correctly if I use "set text" or something to view the result, but when I spawn "characters", it just grabs a random one out of the group still. I looked through the forums and found someone said to "pick all" first. This didn't work. It didn't sound like the same problem, but I thought I would try it.
Does anyone have any suggestions? Thank you for your time!
Use Animation Name, example:
On click on character selection x
if character selection x animation name = "fluffy"
character creator set animation.name (which will be the sprite fluffy) and that's how you spawn and keep the characters name.
or doesn't use direct value at all:
make a persistent object x to store the animation.name
on click on button x, get animation.name > sprite create and/or switch to persistentobject.x (its the animation value)
Does this makes sense to you?