Referencing tables via attributes
I've been working on a game recently that would benefit hugely from the ability to reference tables by putting their names in an attribute, and working with the table by referencing it using that attribute. This would save considerable amounts of logic in some circumstances, and would be a fantastic feature to have.
I asked about it in the meetup, and was asked to make a forum thread to explain/demonstrate the issue. I'm pretty sure we were on the same page soon after, but I thought I'd create the thread anyway to open it for discussion and post a sample project.
Please note that the sample project is specifically to show the issue - I fully understand there are better ways of achieving this specific result, but in the massively more complicated project I'm currently working on the problem is much harder to work around. So please don't offer recommendations specifically to avoid the issue in the sample project - though suggestions more in general are of course welcome - even if they don't solve my problems they might solve someone's!
I'll add some more detail and explanation to this tomorrow, when it isn't 2.20am, but I thought I'd throw it up quickly now.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Comments
I see no reason not to have the ability to select tables by expression. Same goes for sound files (not to derail this...).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I strongly agree.
Without the ability to reference by name, people are force to do some work around using 2D to huge 1D arrays, and that involves some math and introduce complicated logics just isn't as clean as the ability to reference tables by name...and sound too.
And tags too! Don't forget the limitations of referencing tags by dropdown.
Sorry to dig up an old post, but did this ever get implemented?
I'm trying to reference a table with attributes to display text, but it keeps coming up with an invalid expression. The table is working fine as when I refer to it directly (rather than with an attribute) it works fine.
Nope, this doesn't work, unfortunately. Would be awesome!
UGH. Okay. That's a shame - would make dynamic text SO much easier to do. Oh well. Time to create loads of actors with everything exactly the same except a table reference...
Yes, indeed.
Our games: Android | iOS | Indiexpo