You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have a Solo Lua script enabled that sets the terminal_exit trigger, and start a new game, the trigger is called regardless of the presence of terminals in the level or the state of the player looking at a terminal. It also occurs before init is triggered.
This occurs only the first time I start a new game after starting the program. I have confirmed that I do not encounter this behavior when restoring from a saved game, even if it's the first thing I do after starting the program.
I have confirmed this on Aleph One 1.7.1 and 1.8.1
Here is a sample Lua script:
Triggers = {}
function Triggers.init(restore)
print("Triggers.init", restore)
end
function Triggers.terminal_exit(terminal, player)
print("Triggers.terminal_exit", terminal, player)
end
Here is the output to stdout with # commentary.
First run:
$ alephone ~/games/Mararthon\ Infinity/
Aleph One Linux 2024-05-13 1.8.1
[...]
Triggers.terminal_exit nil player 0
Triggers.init false
Triggers.init false
Note that the terminal object was nil.
You can see from Triggers.init that I started two new games. In each case, I saved the game using Game.save(). The first save was intended to capture any relevant state that might cause or prevent the behavior upon load. The second was to see if an untainted save would start exhibiting the behavior. Neither had this issue. The # comments were actually typed into the CLI, to help me keep track of which was which.
$ alephone ~/games/Mararthon\ Infinity/ # restore from first save
Aleph One Linux 2024-05-13 1.8.1
[...]
Triggers.init true
$ alephone ~/games/Mararthon\ Infinity/ # restore from second save
Aleph One Linux 2024-05-13 1.8.1
[...]
Triggers.init true
The text was updated successfully, but these errors were encountered:
If I have a Solo Lua script enabled that sets the
terminal_exit
trigger, and start a new game, the trigger is called regardless of the presence of terminals in the level or the state of the player looking at a terminal. It also occurs beforeinit
is triggered.This occurs only the first time I start a new game after starting the program. I have confirmed that I do not encounter this behavior when restoring from a saved game, even if it's the first thing I do after starting the program.
I have confirmed this on Aleph One 1.7.1 and 1.8.1
Here is a sample Lua script:
Here is the output to stdout with
#
commentary.First run:
Note that the
terminal
object wasnil
.You can see from
Triggers.init
that I started two new games. In each case, I saved the game usingGame.save()
. The first save was intended to capture any relevant state that might cause or prevent the behavior upon load. The second was to see if an untainted save would start exhibiting the behavior. Neither had this issue. The#
comments were actually typed into the CLI, to help me keep track of which was which.The text was updated successfully, but these errors were encountered: