Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triggered actions are not recreated when loading an env's state with loadState() #299

Open
johbrust opened this issue Mar 25, 2024 · 0 comments

Comments

@johbrust
Copy link

johbrust commented Mar 25, 2024

When saving an environment's state and loading it afterwards again in the following way

state = env.get_state()
env = env.load_state(state)

triggered actions (i.e., actions with the Trigger definition) will not be recreated, i.e., they will not be triggered anymore.

To Reproduce
I extended the proximity example with manual control (WASD for moving the spider, R for reloading the state) for testing. Also, the spider dies after some time if on fire (the environment is reset, if the spider dies).
To reproduce the bug, just run the main.py and hit the R key and move to the lava afterwards. The spider should not catch fire then.

Expected behavior
Triggered actions should be recreated after loading some environment's state. For the implemented example this would mean, that the spider should catch fire after reloading the state with the R key.

Desktop:

  • OS: linux
  • Version 1.7.0 (built from current source)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant