How to check the Sapphire Action System in a conditional branch?

I would like to make a type of jumpscare/unexpected battle by turning on the HUD and making the enemy attack the player when they pass by.
I know the script for adding enemies, turning on the SAS, etc., but the problem occurs when I try to put it in a conditional branch. I assumed I would add $game_map.start_sas to the script in the conditional branch, but I'm struggling with how to check if it's true.
Is it even possible?

I've moved this thread to RGSSx Script Support. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-check-the-sapphire-action-system-in-a-conditional-branch.152718/