Hello,
I have a small problem that I hope someone has seen before. In my game, I am trying to track a user's actions towards a patient along with the game time of each action. The user can view his/her last 15 actions at any time for any given patient.
Now, since there are multiple patients, I decided to use a multi-dimensional (faked) array to store the actions. I have a nice little panel that shows up and displays the list of actions. Everything works fine, except the game time.
For the game time, I have a string variable game_time that is updated every iteration. So when it's time to track a message, I simply do something like the following:
p_actions_taken[currentPatient * p_num_of_actions[currentPatient]] = "my action message here";
p_num_of_actions[currentPatient] = p_num_of_actions[currentPatient] + 1;
p_time_of_action[currentPatient * p_num_of_actions[currentPatient]] = game_time;
When I try concatenating the game_time into it, it always shows the current game_time, not the time when the array was updated.
I am assuming the array only holds a pointer to the game_time string instead of a copy of the actual string. Is there any way around this? I was hoping there was a way to concatenate strings without using str_cat. I believe if I was able to do something as follows, it would work:
p_actions_taken[currentPatient * p_num_of_actions[currentPatient]] = game_time + " " + "my action message here";
But that only gives an error.
Any ideas?
Regards,
Doriel