temp variables are lost between "on_entry" and "particle_effects" now
Partner Rank: 2
Verification builds: 1.18.12, 1.18.30
Regression builds: 1.18.0
Summary: Previously, in an animation controller state, temp variables set in the on_entry field were accessible in the particle_effects field. To my knowledge, this was the only possible way to copy a variable from an entity to a particle. This no longer works, the temp variable is immediately lost at the end of the expression.
Impact: Particles no longer work as intended, content log errors appear instead. This breaks both existing and upcoming content.
Repro Steps:
- Download and open "Modern Furniture" from the marketplace.
- Enable cheats fly out of the opening area to somewhere safe (or complete the tutorial)
- /give @p modern:bunk_bed_spawn_egg
- /give @p diamond_hoe
- Place the bed then use the "destroy tool" on it
Expected Results: Many particles appear
Observed Results: No particles appear. Instead, a content log error appears.
Screenshots/Videos attached: Yes
Notes: The relevant file is mfRP/animation_controllers/modern/furniture.json and the relevant contents are thusly:
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.modern.furniture": {
"states": {
"dead": {
"on_entry": [
"temp.particle_quantity=variable.particle_quantity;",
"temp.uv_x=variable.particle_uv_x; temp.uv_y=variable.particle_uv_y;"
],
"particle_effects": [
{
"effect": "break",
"pre_effect_script": "variable.particle_quantity=temp.particle_quantity; variable.uv_x=temp.uv_x; variable.uv_y=temp.uv_y;"
}
]
}
}
}
}
}