Saving To Tables

Hi all,

What is the best practice for saving attributes to a table?

I tried putting a 'save table' rule after each instance that I wanted to save but the results were different on different scenes.

So I put the save table rule in the round rules actor on every scene and it still doesn't work properly.

Where is the save table rule supposed to go?

Cheers

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    In every actor that actually makes a change to a table i usually wrap the save table behavior in a timer that says after .1 seconds save table and put it in the rule that has the update.

    for instance:

    image
  • Fal01Fal01 Member Posts: 460
    Thanks for your answer @jonmulcahy,

    I think my problem is that I am trying to save the action rather than the result of the action.

    ie- I have some keys to collect, so (when keys pressed).- attribute (got van keys)=true

    If I change a boolean table value to 'true' when I touch the van keys and save it, the saved table value doesn't affect anything else in the rules.

    So I have made a workaround where the van keys have a self attribute integer 'touched',
    so when you touch the van keys (self touched)=1

    and an integer table value of 1, so when (self-touched)=(table cell value) do whatever.

    So I have been saving the integer table value that affects the rest of the rule.

    I f I could access the table directly from the rules it would be really easy.

    Sorry if this is confusing. I'm sure there must be a better way of doing this.

    Cheers
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    with the later nightlies you can access table values from both side of the rule creator. download it and give it a try :)

    image
  • Fal01Fal01 Member Posts: 460
    Cheers @jonmulcahy,
    Are the nightly builds stable enough to build a pretty big complex game?

    Also, if my Pro membership expires would I still be able to use the file in GSC?

    If so it would be a Godsend!
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    If pro expires I think you won't get any more updates.

    I feel nighty is more stable than .10.3
  • darrelfdarrelf Member Posts: 243
    In every actor that actually makes a change to a table i usually wrap the save table behavior in a timer that says after .1 seconds save table and put it in the rule that has the update.

    Interesting post considering I'm working on tables in the nightly build.

    Is there a benefit of using timers when writing to tables? I've currently got actors that has this type of simple structure:


    Change Table1 Value
    Save Table1

    Change Table2 Value
    Save Table2


    Should I be concerned that my logic without timers in between these actions are likely to cause problems in my game?
  • Fal01Fal01 Member Posts: 460
    Cool :)
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    I just use timers to make sure the previous action is complete. could no longer be necessary, just an old habit from using GS back in the day.
Sign In or Register to comment.