Hello,
is it possible to pass information to the next lua state when doing a restart with love.event.quit("restart") ?
My game comes with a launcher and passing information by file or the clipboard does not sound like a good solution.
Regards, Fabi
quit("restart") message passing
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: quit("restart") message passing
I'm pretty sure you can't pass information directly to the new state.
Passing by file sounds like a workable solution to me.
Passing by file sounds like a workable solution to me.
Re: quit("restart") message passing
Thank you.
Re: quit("restart") message passing
It's sort of possible in pre-11.3 by exploiting bug in named Channels but it's patched out. However, the development branch which is supposedly to be next major version of LOVE already have love.event.restart(somevalue) and there will be love.restart variable that contain the previously passed value.
Profile. Do you encounter crashes in LÖVE Android and wanna send me logcats? Please hit me up in LÖVE Discord and send the full logcat file!
Re: quit("restart") message passing
Sounds exactly like what I need.AuahDark wrote: ↑Fri Aug 14, 2020 4:01 pm It's sort of possible in pre-11.3 by exploiting bug in named Channels but it's patched out. However, the development branch which is supposedly to be next major version of LOVE already have love.event.restart(somevalue) and there will be love.restart variable that contain the previously passed value.
Thank you for keeping me up to date.
May I suggest to also allow altering the command line parameters (the parameter to the love.load and the global 'arg') which are passed to the restarted lua host?
Regards, Fabi
Re: quit("restart") message passing
Note: It's not possible in 11.3 without using temporary file. The naming channel method I described is fixed in 11.3.
For command-line altering, no.
For command-line altering, no.
Profile. Do you encounter crashes in LÖVE Android and wanna send me logcats? Please hit me up in LÖVE Discord and send the full logcat file!
Who is online
Users browsing this forum: Google [Bot] and 4 guests