Table "Change Table Value" problem/Changing which actor you control.
I'm trying to set up a game where you can control multiple actors by clicking on them to switch it to the one being controlled with move to mouse position rules. I have it setup to change the controlled actor to a random int and then save the clicked on actors name to a one cell table. When it's time to move the actor one of the conditions is self.name is tablecellvalue(Current actor, 1, 1) so only the selected actor moves.
The problem I am having is the table cell value is not updating. I used display text command to do debug testing and figured that much out. If anyone has can see what I'm doing wrong or has a better way to switch between which actor is controlled let me know.
Full size images if it's hard to read
http://s26.postimg.org/at9wwaiif/Gs1.jpg
http://s26.postimg.org/xw0fvgjzr/Gs2.jpg
Comments
I wouldn't use a table for this. A single text attribute should do the trick.
The only thing I see that might be a problem in your table behavior is that you would have to have set the table column to type "text" for the comparison to work since self.Name is a text attribute. If you are comparing self.Name to an Integer, it may not work right.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
That might be the way to go. But I do want to work out how I'm using the "change table value" command wrong. The table is set to text. I'm uploading the project as a .rar if anyone is willing to take a look and tell me what I am doing wrong I would appreciate it.
https://drive.google.com/file/d/0B2r2imdj77pSa1Z6MTMtNHFoN2M/view?usp=sharing
A couple points about your Display Text behavior in the Temp button actor:
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thank you so much pointer number 2 solved the problem.