Yanfly event spawner spawn event at player XY

when using the script call I can either give specific coordinates or a region where the event will be spawned.

How can I get it to spawn at variables?

I’d like the spawned item to be placed in front of the player.
Assuming you've set variables 1 and 2 (or any two variables) to the x and y coordinates for spawning, you should be able to replace the x and y in the script calls with $gameVariables.value(1) and $gameVariables.value(2), respectively. For example, use the following script call to spawn map 1's event 5 (this is based on the first example in the plugin's help):
Yanfly.SpawnEventAt(1, 5, $gameVariables.value(1), $gameVariables.value(2), true)
Thanks a lot

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-event-spawner-spawn-event-at-player-xy.116436/