Tables

naydi306naydi306 Member Posts: 18
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 Member Posts: 210
    Are you saving the table each time you make a change?
  • quantumsheepquantumsheep Member Posts: 8,188
    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: https://quantumsheep.itch.io

  • naydi306naydi306 Member Posts: 18
    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 Member Posts: 8,188
    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: https://quantumsheep.itch.io

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited January 2014
    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.
    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 Member Posts: 18
    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 Member Posts: 18
    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.
    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 Member Posts: 18

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