-
Set Team Names
OK, so I have litterally spent over 10 HOURS using Google, Tutorials, and even multiple forums to find my solution but I can't find anything that works.
Basically, I have 4 teams and I want the user to give the teams custom names. Such as team 1 can be called "Visioneers" for the entirety of the game. I have yet to find such code because I have this across multiple frames and I just cannot find any correct coding.
I have set up currently an INPUT text field in frame 4 for the team names and a DYNAMIC text field in frame 5 for the names to be placed.
Any and all help would be VERY appreciated!
-
In the actions layer on your highest level make 4 string variables
PHP Code:
var team1:String;
var team2:String;
var team3:String;
var team4:String;
You will need to trigger the next code when some kind of interaction on frame four, say a button. You will pull the info for whatever you called the input text area.
PHP Code:
team1 = team1_input_name.text;
team2 = team2_input_name.text;
team3 = team3_input_name.text;
team4 = team4_input_name.text;
on frame 5 put this code
PHP Code:
team1_dynamic_text.text = team1;
team2_dynamic_text.text = team2;
team3_dynamic_text.text = team3;
team4_dynamic_text.text = team4;
-
I'm encountering the same problem I have been for my other solutions:
The team input field now displays "_level0.team1In", "_level0.team2In", "_level0.team3In", "_level0.team4In". (Not really a problem, just an eye sore)
The team dynamic field now displays "_level0.team1Out", "_level0.team2Out", "_level0.team3Out", "_level0.team4Out". (Problem)
My input fields are both var and instance "team1In", etc. and my dynamic fields are both var and instance "team1Out", etc.