Referencing tables via attributes

ArmellineArmelline Member, PRO Posts: 5,366

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! :D

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.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    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

  • tintrantintran Member Posts: 453

    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.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    And tags too! Don't forget the limitations of referencing tags by dropdown.

  • imjustmikeimjustmike Member Posts: 450

    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.

  • pHghostpHghost London, UKMember Posts: 2,342

    Nope, this doesn't work, unfortunately. Would be awesome!

  • imjustmikeimjustmike Member Posts: 450

    @pHghost said:
    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... :/

  • PigeonGamesPigeonGames Member Posts: 18

    @tatiang said:
    I see no reason not to have the ability to select tables by expression. Same goes for sound files (not to derail this...).

    Yes, indeed.

    Our games: Android | iOS | Indiexpo

Sign In or Register to comment.