Left 4 Dead 2

Left 4 Dead 2

Your own custom apocalypse
Discover and download new maps, Add-ons, Mutations and more! Want to try your hand at modding or want to upload your mod to Steam?
Pelajari Lebih Lanjut
How to pass variables between stages in a mutation?
Hi, I'm making a mutation that requires some variables to store game status along the play.
I tried StringToFile() and FileToString() but they give me alot of problems.
I found SaveTable() and RestoreTable() but don't know how to use them.
Any suggestion or sample codes of functions above?
< >
Menampilkan 1-2 dari 2 komentar
Rectus 28 27 Sep 2013 @ 8:17am 
SaveTable() is documented here. It's pretty straightforward to use, but the data you input has to be set up as tables.

For co-op mutations at least, data written to SessionState should survive level transisions. I'm not sure if it gets reset after wipes or vs team switches though.
poM 11 27 Sep 2013 @ 8:41pm 
Thank you. SaveTable() and RestoreTable() do pass variables between stages. Only problem I just found is data in table will be deleted after the round reset or all survivors died.
I think the only way to keep variables alive after players being killed is to store data somewhere else then load them after.
< >
Menampilkan 1-2 dari 2 komentar
Per halaman: 1530 50

Tanggal Diposting: 27 Sep 2013 @ 4:59am
Postingan: 2