Question: Is it possible to auto-generate memory slots?

synthesissynthesis Member Posts: 1,693
edited November -1 in Working with GS (Mac)
When using save and load attribute behaviors...is there a way to assign or call the memory slot (ie...via an attribute definition or an expression)?

If so...how?
If not...CRAP! So much for saving any progress.

Comments

  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    You mean few slots to make a few different saves?
  • synthesissynthesis Member Posts: 1,693
    What I mean is...
    To save in a loop...where as the loop counts...an integer counts with it and assigns the unique name to the memory slot...

    [ loop start ]

    self.saveID = self.saveID+1
    self.nextMemorySlotName = "memorySlot"..self.saveID
    save attribute to "nextMemorySlotName"

    [ end loop ]
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    If this were possible...it could be used within a session as an array.
  • synthesissynthesis Member Posts: 1,693
    @Bark...
    Correct!!! I can't think of a way to do it...I was hoping someone else discovered a way...if possible.
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    I'm thinking it might be possible by setting up the actors with the save/load and then editing the xml...

    It'd be great if Gendai just added the expression option to the key field...
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Nope. Unfortunately, the only thing you can concatenate are text attributes and Image names.

    Which is why some of my Rules have literally 600 behaviors in them.

    Something I could do with 5 lines of code...
  • ORBZORBZ Member Posts: 1,304
    LOL, I know what you mean. It's funny because GameSalad teaches bad programming skills and while it makes some stuff easy, it makes easy stuff hard!
  • synthesissynthesis Member Posts: 1,693
    Thought so...
    crap!

    Dynamic memory slots sure would be nice.
  • cbtcbt Member Posts: 644
    Can you translate all of the posts in this topic to Abron please? I surely will understand more :D
  • synthesissynthesis Member Posts: 1,693
    @CBT:

    We are referring to the save and load attribute behavior.

    Currently you can only save or load data by manually creating a slot to store the data via the behavior. If you have 100s of pieces of data to store (such as saving the progress of a data driven game...like a matching game or card game), there is no way to script a routine to do that automatically...it would require you to build each and every memory slot by hand within an actor....which could take days...vs an hour if you could script it or create a looping rule that saves in a sequence...such as memoryItem1...memoryItem2...memoryItem3...with the rule changing the number incrementally in each save loop....until you reach memoryItem468 (or whatever number) where the loop would stop.

    Until GS implements an expression field in the save and load behaviors for the memory slot's name...that isn't possible...unfortunately. Because if it were...it would be HUGE for data storage handling and make arrays possible (kinda).
  • cbtcbt Member Posts: 644
    synthesis said:
    @CBT:

    We are referring to the save and load attribute behavior.

    Currently you can only save or load data by manually creating a slot to store the data via the behavior. If you have 100s of pieces of data to store (such as saving the progress of a data driven game...like a matching game or card game), there is no way to script a routine to do that automatically...it would require you to build each and every memory slot by hand within an actor....which could take days...vs an hour if you could script it or create a looping rule that saves in a sequence...such as memoryItem1...memoryItem2...memoryItem3...with the rule changing the number incrementally in each save loop....until you reach memoryItem468 (or whatever number) where the loop would stop.

    Until GS implements an expression field in the save and load behaviors for the memory slot's name...that isn't possible...unfortunately. Because if it were...it would be HUGE for data storage handling and make arrays possible (kinda).

    Well I should say, besides the performance improvements, I've never felt any need for the some additional requests or needs by other users (including this).. That is what makes me sad.. Because it shows I'm only at the beginning of the road :D

    But thanks to you and some other community members GS becomes the #1 engine despite its insufficiency in some areas.

    I hope they take care of this "saving" stuff before I need it! :)

    Thanks for explaining..
Sign In or Register to comment.