Ok so I made a sanity meter and now I'm working on some basic effects. I want for when the player examines/picks up/uses an item or opens a door it has a chance of displaying a message if your sanity is below 45. I have the randomizer and sanity variable displayed here: Code: ags but I'm missing the "flag" or trigger for it if you will. I have the variable as a global. I'm pretty sure this is incredibly simple.
if (player_Sanity< 45)
{
int dice_roll = Random(100);
if (dice_roll < 25)
{
(Display "I'm a bit tense.")
}
}