Doesn't necessary have to be launched from package script. GetTransitionRenderTargetName specifically is triggered when a pause is happening. This can be also done during regular single attack script.
Did some testing in a single script, the image would sometimes not appear unless I hit ESC button once. The image got rerendered every time I hit escape without calling the testRender again which is interesting. Seems like the object is dynamic?
task testRender {
wait(60);
let tex = GetTransitionRenderTargetName;
let obj = ObjPrim_Create(OBJ_SPRITE_2D);
ObjPrim_SetTexture(obj,tex);
ObjRender_SetBlendType(obj,BLEND_ADD_ARGB);
ObjRender_SetAlpha(obj,255);
Obj_SetRenderPriorityI(obj,80);
ObjRender_SetScaleXYZ(obj,1,1,0);
ObjSprite2D_SetSourceRect(obj,0,0,256,256);
ObjSprite2D_SetDestCenter(obj);
ObjRender_SetPosition(obj,200,100,0);
}
About your code, if your goal is purely to snapshot the screen as a still, you could actually use way more shorter version:
let tex = GetTransitionRenderTargetName;
RenderToTextureA1(tex, 0, 100, true);
PauseStageScene(true);
// Summon your pause script.
Edit No duplication but actual dynamic refresh?