Print message after room description

I have the following rule:
After going to the street in the presence of a guard:
say “‘Halt! Who goes there?’”;
continue the action.

The result is:

w
“Halt! Who goes there?”
The Street
A street of no particular description.

A guard is here

But I want the halt message to appear after the room description has been printed. How can I do this?

i.e. I want…

w
The Street
A street of no particular description.

A guard is here
“Halt! Who goes there?”

I suppose you have a rule for writing a paragraph about the guard? Then, say the guard’s line in that same rule, making it dependent on some condition or other. E.g.:

For writing a paragraph about the guard: say "A guard is here.[if the player was not in the street]'Halt! Who goes there?'[end if]" if you want the guard to demand that the player identifies himself each time he enters the street, or For writing a paragraph about the guard: say "A guard is here.[first time]'Halt! Who goes there?'[only]" if you want the guard to do so only the first time the player shows up.

Whenever you want something to display at the end of a turn, you can use an every turn rule. This works: Every turn when going in the presence of the guard: say "'Halt! Who goes there?'";

Thank you so much Felix Larsson

Sorry for the late reply.

My final rule is:

For writing a paragraph about the guard: say "A guard is here.[if the player is holding the lantern and the lantern is lit]'Halt! Who goes there?'[end if]"