-
1) in the latest example this is working correctly, so maybe something slipped off during the code transfer
you should make sure that:
a) all your blocks get a "block_type" on creation
b) when you save your blocks you also save "block_type"
c) when you load your blocks (destroy all current blocks - recreate all blocks from ini) you also set their "block_type"
d) you always change block animation to "block_type" / OR change it on creation and set texture animation to "looping" (otherwise they will change and return to "stopped")
2) you mean that the application should auto-save content when you close it?
You can do it pretty quick just by adding:
(button save clicked <-- your existing save condition)
+OR
+end of application
to your "save button" clicked event
you can find end of application / end of frame conditions in "storyboard" controls, along with "start of frame"
-
5 Attachment(s)
ORs are another thing I haven't used often. Would this be a filtered or logical operator?
Also, I have the Save occurring when I leave the frame, and the Load occurring at the Start of Frame. Would this affect anything?
Here's what I have:
Attachment 19360
Block Creation
Attachment 19361
Changing the Animation of the "Template", or the Active you would click on to change Block Types.
Attachment 19362
Loading Data
Attachment 19363
Saving Data
Attachment 19364
Saving/Loading Loops for the Blocks
Sorry to be dragging this Thread out so long. I know there are other issues that need attention, so I want to hopefully wrap this up!
-
You can go with any OR, in this situation would be the same.
On the loading issue:
maybe I spotted something on the very last line of last image,
you seem to reference a different INI file (has a "shortcut" icon differently from the ones above)
this could explain why loaded blocks have no "block_type".
If this doesn't solve the issue,
there's something I can't clearly grasp on the loading codes,
you're clearly doing something specific basing on global values A & T but don't know what X)
-
Thanks once again! ;D
The positions AND block type of the blocks are saving and loading between frames. However, the "End of Application" error is still present. Could it be due to a missing "Set File to [...]" Event? I also tried adding an OR operator to no avail.
Also, the Global Values are when you return from a specific frame. EX: T would set a Group's position outside of the Frame because it would be unused further.
-
Set file should be needed just one time per frame (before any operation), as long as you always use same file
I've just tried the "end of application" code on previous uploaded example and seems to work fine,
how are you "shutting down" the application? Through events or through Windows "close" red X button (or both?)
If you do this through events (like button pressed --> close application)
you can maybe try:
button pressed ---> save stuff ---> close application
?
Hard to say what may be wrong!
Can you recreate this not-working on the example above?
-
I was doing the "End of Application". Although, I feel like a Clickteam Noob with this mistake. X)
I was thinking, "It will save when the application ends...on any frame". I have it set so the Close Button in Window Settings is disabled, and the only way to close the Application is to go back to the Main Menu.
Would I have to mess around in Global Events? Or, is there some other way I can accomplish this in the World's Frame?
-
If you use qualifiers you can't set this in global events unfortunately,
as qualifiers can't be used in global events
Guess the most practical way (beside not using qualifiers) would be hard-coding this on each frame
(put all code inside a group and copy-paste this group through frames)
You can try "end of frame" events,
or simply embedding the save code into your "go-to-menu" button
(user click "go-to-menu" ---> save stuff ---> go to menu XD)
-
I was testing out the actual landscape objects, and these save fine when I close the Application. Could this point to an issue just for the block's saving then? Also, since the only things with qualifiers now are the landscape objects, would this open any potential for Global Events again?
-
1 Attachment(s)
Hard to say without inspecting the code,
I would try testing step by step
and see what/when goes wrong - single action at time
You see, this is working fine in previous file:
Attachment 19384
so it should work in your official app as well...
-
1 Attachment(s)
I think this .mfa file sums up my issue. You close the game on another frame. If there is no simple way to save the files in this way, what would I need to "hard-code" into each frame, and under what event? (End of Frame, End of Application, etc.)
Also, I tried rearranging the order of code in the actual Application. It didn't have any effect, unless there's something specific that needs to go first in the Save Events.
Attachment 19398