Problem with Attribute and Change Attribute

DevilsDevils Member Posts: 561
edited November -1 in Working with GS (Mac)
Alright like the title says every time I place the attribute and change attribute when I go to preview it loads the preview fine but when I back out there both blanks. Can someone help out?

Comments

  • synthesissynthesis Member Posts: 1,693
    Shouldn't happen.

    Try a restart.
    Also try reinserting the behaviors.

    Are you changing the seed/parent actor or an instance? I always create my attributes in the seed actor and then modify them if needed in an instance. I try to avoid adding attributes to an instance only.

    Make sure you are using the ".." button and selecting the expression/attribute rather than typing it in.

    Other that those things...I'm out of ideas on what might be causing it without more details of the circumstances.
  • DevilsDevils Member Posts: 561
    I don't really know what you mean by changing the seed/parent actor or the instance. I haven't been using GS for a long time so I don't know everything there is to know. I did use the ".." button but it won't let me add the .name so I kept clicking on it till I was able to change it. Could that be the problem? What I'm trying to achieve is adding text to an image that when a player tap will change to the next text.
  • synthesissynthesis Member Posts: 1,693
    The seed/parent actor is the object in your library of actors. An instance is an actor that is used in scene. If you don't unlock it...it will maintain its parent settings. Unlocking it makes it a unique actor instance.

    The .name attibute is the actor name. I don't think you can change it in game.

    Try creating a text controller:
    Create an integer attribute...such as self.textID with a default of 1

    Then build the following rule structure:

    Rule:
    when self.textID = 1
    display text...

    Rule:
    when self.textID = 2
    display text...

    repeat for each unique text you need.

    Then create your button rule structure...such as

    RULE:
    when touch is released
    self.textID = self.textID + 1
Sign In or Register to comment.