Download

How to Save The Do Once Node

Hi I wanna make it so that whenever I go into a certain level it does something Only One time but I don’t know how to do it. I know how to save data but I have no idea how to save the DO ONCE Node.
Any ideas?

If you really need to go with saving, you can just save/use boolean variable, e.g. “isProcessed”, and then in the Branch node, before DoOnce, check that variable on True/False. Change variabel state in the end of the DoOnce sequnce. Maybe you don’t need DoOnce, if you will have that variable.

In this case you don’t really want to use Do Once, you just want to gate your functionality with a Branch with a boolean (“ThingWasTriggeredOnce”) that you save.

Since you know how to save/load variables to a save file (presumably that’s what you meant), you can just load the data at the start of your level and check if ThingWasTriggeredOnce is false. If so, do whatever it is you’re doing, and then set the boolean to true and save it. Next time you play it won’t go through since *ThingWasTriggeredOnce *will be true.

If you really need to go with saving, you can just save/use boolean variable, e.g. “isProcessed”, and then in the Branch node, before DoOnce, check that variable on True/False. Change variabel state in the end of the DoOnce sequnce. Maybe you don’t need DoOnce, if you will have that variable.