See something and react if something has a specific value

Hello dear authors,

I’m despereately trying to develop the following scenario:

I’d like to write a “global” rule to handle if the Player can see an object within the same room which has a custom value i defined in before.

The code looks like this:

A person can be infected or healthy.
A person can be aware or unaware.

The zombie is a person.
The zombie is infected.
The zombie is aware.

Every turn when something can be seen by the player and something is infected:
say “Gosh, [the random something that can be seen by the player] doesnt look to well!”;

The problem now is, that inform reports random objects, even those without the infected attribute… I’m looking through this forum and google since yesterday but I cant get it done.


Right now, Inform is reading your condition as (anything in the world can be seen by the player) AND (anything in the world is infected).

Try this:

Every turn when the player can see an infected thing (called the biohazard): say "[The biohazard] doesn't look too well..."