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?
Подробнее
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?
< >
Сообщения 12 из 2
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.
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.
< >
Сообщения 12 из 2
Показывать на странице: 1530 50

Дата создания: 27 сен. 2013 г. в 4:59
Сообщений: 2