Health Bar and Actor

hello, plz help me. I m beginner.i want health bar as one actor .i want to join health bar actor with other actor.Other actor come as randomly.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Google "health meter gamesalad" and you'll have your answers.

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

  • tezartezar Member Posts: 2
    sorry , i mean personalized health bar for each enemies.i can't it...
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Well, the process is the same but you have to constrain the health bar to a position above the enemy. If you have more than a few enemies, have the enemy spawn its own health bar and then use a table to "broadcast" the enemy's position and have the health bar "read" the position from the table. To coordinate the two actors, have a rule in the enemy that increases the value of game.enemyNumber by one and writes to that row of the table and have a rule in the health bar actor that sets its table row to the same value. I know, kind of confusing... maybe I can make a demo.

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

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Okay, here's the demo. It starts with three enemies on screen (each with its own health bar) and spawns a new enemy every three seconds. Tap an enemy to reduce its health by one. When an enemy's health reaches zero, it is destroyed.

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

Sign In or Register to comment.