Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi, you could run the script command to set a switch to ON/OFF depending on if the letter was opened:

const letterId = "your_id";
const switchId = 1;
$gameSwitches.setValue(switchId, $cgmz.getMailboxLetter(letterId)._isRead);

I can attach the envelope images later to the downloads.

Deleted 1 year ago

Thank you so much for this! In your code I noticed it records how many letters have been received and how many in total are read, is it also possible to put these into switches/variables as a script?

Hi, I have added the envelope images to the downloads for this.

You can get the total amount received with the following script

$cgmz.getMailboxReceivedLetters().length

And the read with the following script:

$cgmz.getMailboxReadLetters().length

You would put these in the Control Variables -> script box

Again, thank you so much for this!