So, in my game I want to make it so that every time a certain switch is turned on, the value of a variable increases by 1. Does anyone know how to do this? I've tried and I haven't gotten far. Thanks. 🙂
EDIT: Oh, forgot to mention originally that I'm looking to find a way to make a variable still be increased from when the switch was on, even if it's off.
Yea, I've been trying this, and it hasn't worked; If you use the \v[n] command in a text box, it will tell you the value of a variable, and all it says for me is 0. I probably should've mentioned this earlier, but I'm looking to find a way to make a variable still be increased from when the switch was on, even if it's off. Thanks for trying to help, though!
It might be better to explain what it is you're trying to do, rather than how you're trying to do it. What is this supposed to accomplish?
Could you explain a little more, please? Or maybe a screenshot of your actual event?
Because I don't understand what you are trying to do or how...
Sure, sorry for the confusion.
I'm trying to make it where the player goes to "sleep", and each time they do at the end of the day, a switch turns on, and I'm trying to make it so that when that switch is on, the value of the variable I have labeled "days" increases by 1. Hope that helps.
EDIT: Oh, and the switch sleep turns off by the next day.
That event won't run just because you turned on that switch 😛 there is no condition for it to run if that switch is on - see the left side of the event screen? You would need to select that switch of yours there, and then set the event to autorun, and don't forget to turn it off either, since it'll loop with an autorun.
In fact, why does it need to be a separate event in the first place? You can simply .. fade the screen, add +1 to variable Days, and fade the screen back in - no need for a switch either.
But if you're trying to do a day & night system, then I suggest using common events for this. Create a new common event, call it "New Day" or whatever. In this common event, add in everything you want to happen when the player has gone to sleep (don't add in a fade!), such as increasing the variable Days.
Then, in the event that asks if you want to sleep, and the player selects yes, fade out the screen, and call common event New Day, fade the screen back in. Tada ~ a new day, and you can always go back to your common event and edit it with new stuff, and the sleep event does not need to be edited.
Mostly though, you need some beginner guides!
Oh, I see what I was doing wrong. Thanks a bunch for helping me, guys!!! 🙂