Skip to content

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

@johbrust

Description

@johbrust

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions