Jump to content
Sign in to follow this  
Holden93

Save data into text file

Recommended Posts

Hello!

I'm working on a campaign and there is a side activity where some clues about the location of a sergeant who went crazy some days before are left around the AO, I'd like to save what the player found so I can keep track of what he did, is it possible with sqf?

Share this post


Link to post
Share on other sites
Hello!

I'm working on a campaign and there is a side activity where some clues about the location of a sergeant who went crazy some days before are left around the AO, I'd like to save what the player found so I can keep track of what he did, is it possible with sqf?

A scenario where the player finds some photos.

profileNamespace setVariable ["photosFound", true];

Then when you want to recall if the player found those photos.

profileNamespace getVariable ["photosFound", false];

https://community.bistudio.com/wiki/profileNamespace

Share this post


Link to post
Share on other sites

Thanks, easier than I expected, one more questions, what's the second argument for getVariables for? The default value?

Share this post


Link to post
Share on other sites

If you work within a campaign environment I'd recommend to use saveVar. It saves values stage-based within campaign space and makes them available in later missions. As for your question: Yes, the second argument is the default value.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×