Follow-up Comment #15, bug #21776 (project wesnoth):
> Like the lua environment that is not saved.
Well it's hard to do so. And most likeley that won't be fixed soon.
> don't forget the save/load process doesn't lead to an identical situation,
since the controller may change.
Especialy in a mp game, a controller can also change during the game without
reloading. And yes making decisions dependent on current controller types
might result in OOS in some cases.
> A preload event is fired sometimes, sometimes it is not.
I agree that this can be confusing
> So the input must stay within turn 2.
But i think the turin 2 event is inside turn 2?
also if you are agree with fireing on teh next moveto event like
> Hmm ... it could still work if a preload event just detected a reloaded game
and then first moveto
there is an option using sync_choice whcih is replay save even in 1.12 (maybe
even 1.10):
1) Choose a variable name like 'was_reloaded'
2) set 'was_reloaded' to true in preload events.
3) in moveto events do something like
[lua]
code=<<
local was_reloaded = wesnoth.synchronize_choice(
funtion()
return wesnoth.get_variable("was_reloaded");
end)
wesnoth.set_variable("was_reloaded_synced", was_reloaded)
wesnoth.set_variable("was_reloaded", false )
>>
[/lua]
4) dont use the variable 'was_reloaded' anywhere else
and you'll have a replaysave variable 'was_reloaded_synced' that contains
whether there was a reload between this move and the last move.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?21776>
_______________________________________________
Nachricht gesendet von/durch Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs