Quote: "The enemy must not react until I take the weapon out."
You can do it with the
scancodekeypressed condition by waiting for the 0 key to be pressed, and then watching for a key press of 1-9 before allowing the enemies action to run.
If the player doesn't press 0 before getting within range of the enemy, then the enemy script is allowed to progress. Otherwise, if zero is pressed, it loops until the player presses 1 - 9 or gets out of range. It wouldn't be perfect but it can be done.
There may be another way, but I can't think of it right now.
Best.
EDIT: Of course, you could always use the scroll button on the mouse to bypass it.
I'm sorry, my answers are limited. You must ask the right question.