Getting the Name of an Actor from the Scene Manager?

NickamonPoppytail

  • *
  • Posts: 1141
Hi,

I'm using individual actors in one scene to represent each unlockable character in a game I'm working on. So I know which actor represents which character, I named each of the actors in the scene manager after their characters. What I need to do is check whether the name of that actor in the scene manager is present in a list (of the characters the player has unlocked), so that the game displays this information correctly.
Upcoming Projects
Poppytail 5 and Pixeltail: Fifth and sixth main instalments in Poppytail series. A Game About Trimming Hedges: Final Version: An updated version of the original AGATH. One Million: Last-one-standing style small project. The Poppytales: Platformer boss rush with character collecting. Skies n' Fall: Boss rush shooter prequel to Rise n' Brawl. Precious: Weird platformer. Christmas Time 2: Sequel to Christmas Time 1.

irock

  • *
  • Posts: 2891
You should use a behavior instead.

In a new Actor Behavior, create an unhidden text attribute called "name" and attach the behavior to the Actor Types (or Actors, directly from the Scene Designer) in question. From the Scene, double click on the Actors and type names into the "name" field for the behavior you attached. You can access it using the "get value for actor" block: