Saving/loading Playmaker variables

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
nickg84
Posts: 12
Joined: Mon Sep 13, 2021 1:52 pm

Saving/loading Playmaker variables

Post by nickg84 »

Hello,

I'm trying to put together a way to save an equipped clothing system on my character. I'm still a beginner and don't know code, but am getting well acquainted with Playmaker.

What I've got going now are two objects, each with an FSM. One object "Gets" the current clothing item and stores it in an INT. The other object "Sets" the INT.

What I'd like to do is turn both off, and have the Dialogue save system fire an event to turn on the object that "Gets" and stores the INT at the time of saving, and turn on the object that "Sets" the INT at the time of loading in. I'm using a third party product for this clothing system, so I'm trying to figure out a way to integrate it in.

I may not even be going about the right away, but this is the closest I can get at the moment. I'm getting all the right variables stored properly, but getting them to only get and set at the time of saving/loading is where I'm stumped.
User avatar
Tony Li
Posts: 22133
Joined: Thu Jul 18, 2013 1:27 pm

Re: Saving/loading Playmaker variables

Post by Tony Li »

Hi,

The Dialogue System's PlayMaker integration has an action in the category Pixel Crushers Common called Save Game To Slot. You can use this to save the game to a slot using the Dialogue System's save system. (Make sure you've set up the save system.)

Before using the Save Game To Slot action, use the Dialogue System > Set Variable action to store the current clothing item Int into a Dialogue System variable.

Similarly, to load a game, after using the Pixel Crushers Common > Load Game From Slot action, use the Dialogue System > Get Variable action to retrieve your current clothing item Int.
Post Reply