Tables and characters being able to reference other characters self.attributes?

Is it possible? When I looked at tables a while back, I was turned away by the fact that I couldn't understand how to select a specific column/row in a table on the left attribute selected of constrain behavior.

I want to have all enemies spawn a transparent actor that is going to be offset a little above them to show their self.HP numeral. Positioning the actor and making them transparent are easy, the hard part is getting an actor to display another actors self attribute without having to make a game attribute for each character spawned.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2014
    The current nightly build (available to Pro members) has amazing new functionality which includes the ability to use a table expression on the left side of a rule condition and also allows setting an offset for displayText so that you can display an attribute's value above/below/beside an actor.

    So you could wait for the next stable build or invest in a Pro membership and try it out with the nightly builds.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    If you want to try another way without the nightly build or next release, my enemy health bar demo is the best way to do it. It uses tables to sync actors' positions.

    http://forums.gamesalad.com/discussion/comment/384027/#Comment_384027

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • FrantoFranto Member Posts: 779
    Ah many thanks. Now I see why Nightly builds are all the rage. So it can do both reference tables on the left AND display text with offsets? That's incredible.

    Thank you for the demo. It will help me understand tables. Enemy health bars are a tried and true method. I'll think about using it, if not for this game, at least for another as my goal is to make 3 games before the Tizen event in March and 1 or 2 before it's showcasing later in February.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Well, the process of constraining a transparent actor to display the value of an attribute is the same as constraining a health bar actor so I thought it might be useful.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • FrantoFranto Member Posts: 779
    edited February 2014
    Ah, true, I was too focused on other things, my bad. Thanks again for the help.
  • FrantoFranto Member Posts: 779
    edited February 2014
    This is rather impressive having looked through it. Although, now that they have announced offsets for display text, I think I will wait for that since all my enemies already have display text for hp on them.

    Thanks again.
Sign In or Register to comment.