Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I'm trying to get a game to execute a command *once* the very first time it is run (I'm exporting using Node Webkit). I could do this with local storage, but that seems like an inelegant solution. Is there another solution I'm overlooking perhaps?
Develop games in your browser. Powerful, performant & highly capable.
if you are using score system like High Score and saving them in local storage then
On start of the layout
if High Score =0 then do anytihng
Local storage as a flag/variable is the simplest way. You don't even need to store a value really, just of the key exists, you know the program has been run before.
Alrighty, guess it'll have to do. Thanks for the help!
You can see an example of that in the Score system of this tutorial.