GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Tables

naydi306naydi306 Posts: 18Member
I created a table with the attributes that I would like to change with each scene. Than I created a round rules actor to change the attribute to match the scene. .... My problem is that the round rules actor changes attributes for 2 scene then it no longer seems to affect the the scene changes. Do I have to create an actor for each row of attributes I change? How can I link all my scenes to the table so that I can change the scenes attribute to match the correct attributes?

Comments

  • zoopezoope Posts: 210Member
    Are you saving the table each time you make a change?
  • quantumsheepquantumsheep Posts: 8,188Member
    Sometimes a rule will need to be wrapped inside a timer to help it spark!

    Something like 'after .1 seconds, do rule'.

    Hope that helps!

    QS =D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: http://www.quantum-sheep.com

  • naydi306naydi306 Posts: 18Member
    Sorry it has taken me so long to get back to this post. I guess I didn't explain my problem well enough.

    I have a table. The table values are not changing. So I don't have to keep saving the table.

    My table is set up for my scene changes. If you are on row 1 then you are to follow the row one order of the scene changes. So if I am on level 11 then I follow row 11 for the sequence of scene. Scene one, is col. 1, Scene 2 col. 2 etc. My problem is that the my Attribute "Game: Set Row" is not staying set through all my scene. Do I have to set a game attribute to save when changing scenes? Do I need to load that attribute every scene?



  • quantumsheepquantumsheep Posts: 8,188Member
    edited January 2014
    Ah - I am doing the same thing, but they way I'm doing it lets me keep all the action in one scene, so no need to change.

    The way I did it is that once the level is complete, you have to press a button to continue.

    Pressing the button increased the level variable by 1.

    This makes sure that the table look up is fired off and the game knows to read the values from the next row.

    I'm not sure how you're doing yours. If you're just increasing the level by 1 every time you change scene, you could put a rule in a control actor that just says 'change attribute level to level+1'

    This wouldn't work if you could choose which level to go to (e.g. if you've finished level 1 and can then choose to go to level 3 or 6 or 9).

    Does that help at all?

    QS

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: http://www.quantum-sheep.com

  • tatiangtatiang Posts: 11,845Member, Sous Chef, PRO, Senior Sous-Chef
    edited January 2014
    naydi001 said:

    My problem is that the my Attribute "Game: Set Row" is not staying set through all my scene.

    Then you are changing it somewhere in your code. Game attributes do not reset or lose their values on their own.
    naydi001 said:

    Do I have to set a game attribute to save when changing scenes? Do I need to load that attribute every scene?

    No and no. I suggest adding some log debugger statements to your code so that you can watch the value of that attribute at various intervals to determine where the problem lies.

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

  • naydi306naydi306 Posts: 18Member

    Ah - I am doing the same thing, but they way I'm doing it lets me keep all the action in one scene, so no need to change.

    The way I did it is that once the level is complete, you have to press a button to continue.

    Pressing the button increased the level variable by 1.

    This makes sure that the table look up is fired off and the game knows to read the values from the next row.

    I'm not sure how you're doing yours. If you're just increasing the level by 1 every time you change scene, you could put a rule in a control actor that just says 'change attribute level to level+1'

    This wouldn't work if you could choose which level to go to (e.g. if you've finished level 1 and can then choose to go to level 3 or 6 or 9).

    Does that help at all?

    QS

    For my game don't want a button to contine onto the next scene. However I think I understand what you are doing. Thx


  • naydi306naydi306 Posts: 18Member
    tatiang said:

    naydi001 said:

    My problem is that the my Attribute "Game: Set Row" is not staying set through all my scene.

    Then you are changing it somewhere in your code. Game attributes do not reset or lose their values on their own.
    naydi001 said:

    Do I have to set a game attribute to save when changing scenes? Do I need to load that attribute every scene?

    No and no. I suggest adding some log debugger statements to your code so that you can watch the value of that attribute at various intervals to determine where the problem lies.
    Thx Tatiang. I just watched a debugging tutorial. I will see if I can make it work.
  • naydi306naydi306 Posts: 18Member

    Thx tatiang, I just saw a video on how to use the debugger.
Sign In or Register to comment.