Hello or Hello again to all,
I would like to make a scene where the players can write their names on the phone but I have a problem. When Player 1 clicks on the blue square to validate his name, then his name is displayed in all the text areas
I would like his or her name to appear in only text area number 1.
I attach two screenshots of my events and the “game” link to see the extent of the problem.
Thanks again for your reactivity
Link of “game” :
Are all the text areas on the scene the same object named ‘NomJoueur’? If so, the ‘Change the text…’ action will affect them all because technically it should.
You could either create separate objects for each of the text areas with different names, OR, add an instance variable to each of them to distinguish them from one another and add that in your conditions.
For example, add the instance variable WhichPlayer to each of the text areas, one with the value Player1, another with Player2, another with Player3.
Then when you want to add the name in your events sheet, add a condition that references that instance variable like so:
Add the same condition with 'Player2", “Player3” etc when you’re trying to target that text area.
Thank you for this very helpful answer!
I tried what you said but I’m stuck… I’m having trouble understanding what the problem is with that
Sorry it’s hard for me to follow along with the french code, is it just doing the same thing or are you having different issues?
Sorry, I forgot to translate the code into English. I have just modified the photo
When I click on the button nothing happens… I don’t know if I put the line of code in the right place or if I need to move it or if I need to change other things…
I’m not sure I quite get the text area setup you have going here. You have just the 1 text area used for showing captured input called NomJoueur? If so, that kind of neglects the point of using/checking for the instance variables (if every text object has it’s own name.)
Let me try something over here and I’ll post back in a bit.
Let me make it easier to transfer my start of gambling to you, so that you can become more aware of the problem.
Sorry, didn’t see your post in time so tried recreating it from scratch. Anyway, see if this helps - it’s a little different but I think does what you’re trying to do.
That’s exactly what I’ve been trying to do for days! You just helped me take a giant step.
Thank you so much