Thanks so much for helping.
I've tried like 50 different variations of what you suggested mixed with a lot of googling/redditing and still nothing.
Right now, I think I'm close - so I landed on entering the code into the TileMap script directly and calling the $Sprite's location, so that I could specify when the sprite is at a certain location (during the animation), tile map paints a tile there.
func ready ():
if $Sprite.setposition ( 404.29, 340.293):
TileMap.setcellv(404.29, 340.293, get_tileset()
The values are from the first position of the sprite as it shows in the Inspector where I want the tile painted. Alternatively, I had tried using the grid (8,1) coordinates and it had no clue what to do with those.
The error I keep getting now is "Non-static function "set_cellv" can only be called from an instance".
I don't understand, I'm writing in TileMap, where is the confusion for the script to use set_cellv coming from? Should I try calling the scene tree??
I also can't find anything anywhere about how to determine which tile I want placed. I had previously in the last line "gettileset(findtilename("Dirtline"))" and it was returning the error that findtile_name is not in this class, but I'm writing in extends TileMap.