I was remaking my custom grass to be more optimal by using a modified ground with an animation change to the grass sprite. It works perfectly except for when you go to a different map it will change back to the default animation for a second before changing back to the modified animation. Does anyone know of any workaround, I've tried using map:on_started(), map:on_finished(), game:on_map_changed() and none of these so far have worked.
Code Select
entity:add_collision_test("overlapping", function(entity, hero)
if hero:get_sprite("ground") ~= nil then
hero:get_sprite("ground"):set_animation("purple")
end
end)