In a mod I'm designing I am making a meditation forge (kind of). Its a spell that when you cast it, it places the furniture greybeards meditation marker and the player activates it to meditate (done automatically after spell is cast) and learn specific spells added by the mod. Kind of like the greybeards learning new shouts, same theory but a little different in practice. Its essentially a forge menu that plays with the greybeards meditating animation.
At the moment there are two issues with the spell that I can't seem to work out:
1- The meditating animation doesn't play the first time in a cell. You have to use the spell and leave the meditation state and re-use the spell a second time for the animation to play. The menu opens to create the spells but the animation doesn't play on the first casting of the spell in a newly entered cell.
2- The markers aren't removing right after getting up from casting. I tested the spell a lot in the whiterun market and when I returned there most of the NPC's were meditating. Kind of funny but also annoying that the spell doesn't remove the marker right away after meditating ends even though I specified it to do so in the script. You can still talk to NPC's no problem though.
So to recap my issue, the spell works fine; the forge system works. just that the animation doesn't play the first time you cast the spell in a new cell (entered) and the meditation furniture doesn't remove even when the player stands up, even though it is specified in the script to do so.
Thanks in advance to anyone who can offer help