You can put a string into a variable using the Control Variables command. The string goes into the Script box at the bottom. You MAY need to put it in quotes - I'm not sure, so give it a try with or without and see if it breaks.
Also check out the beginners' guide link in my signature, as it sounds like you need to learn a bit more about events and triggers.
Create an autorun or parallel process event on your starting map.
Do the Control Variables command to set your variable to a string.
Add a Control Self Switches command to turn self switch A on.
Add a second event page to your event and set its condition (top left, above image) to be Self Switch A = ON. Don't make ANY other changes to this page.
I tested ti and your method worked! But will it run every time the game runs or just the first time? Also will this create lag?
Using the self switch and additional page conditioned by the self switch means it will only run once during the game and never again.
And no, it won't cause lag. Why would you think it would? You are telling it to run the first time the map is loaded, and then never again. I assume you've ONLY changed the condition on the second page, and haven't change the trigger of anything else.
Please look at the Starting Point for New Users in my signature, as I already asked you. These tutorials will explain all of this.
The beginners page didn't answer my question/. I meant that would it load every time a game is continued, only on the first playthrough and store the variable permanently or only on the first playthrough and leave it blank any time after that? which is my concern. The lag concern was because i'm planning it to load at least 160 variables at once.
It will run once. Because you give it a second page and you set the conditions so the second page is active, that prevents the first page from running again. Ever.
I meant it originally in the sense of "If the game is resumed will the value return to zero since we are no longer in this map" but i tested it (what i should have probably done in the first place) and found out that once set, the value will remain the same.
I guess this has been answered and can be closed.
If you want your thread closed, please Report your opening post (the Report button is bottom right, near the MultiQuote button) and ask for it to be closed. The mod for this forum might not see your post, but will see your Report.
Thanks.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.