I'm wondering if I could do a second variable for a longer respawn time and would this need a second common event, too or could I put it in the same common event?
I might be confused - why would you need a second variable? Just set it to a higher value.
JavaScript can take integer values up to 9,007,199,254,740,991 so that's probably more than you need.
Alternately, you
could in fact use a second variable in the common event so that the number you push into the arrays for your nodes represents seconds or minutes, rather than frames.
e.g.
Control Variables -> +1
Conditional Branch -> that variable == 60
- Control Variables -> 0
- Trihan's script
will make it run every second instead of every frame. You can adjust the math from there. But there's really no need for that.
Also, what would happen, if the player doesn't wait it out, but goes to bed at night?
They wake up feeling rested.
Is it possible that an innkeeper event could add specific time/frames to the timer?
Oh, you meant the player makes the
character go to bed
😛 Sure.
Just make another common event, copy the script from the parallel one. You'd change two things:
- change the second line from saying
-- to saying
-=28800
- change the third line from
=== 0 to
<=0
Then make your innkeeper call that common event.