Page 1 of 1

Check for dark places

Posted: Wed Oct 21, 2020 8:42 pm
by zzo38
It is possible to use a ZZT-OOP code to check for if a place is dark. The draw procedure for stars will change their colours, so you can check if something is visible (either because the room is not dark, or because it is in the range of the torch light), by throwing a star and then to change into something else and check their colours, if it was obscured by the dark then it will be white, otherwise not.

For example:

Code: Select all

@Stuff
/i/i/i/i/i/i#throwstar e
#change star water
#if any white water give score 1
#restart
(This message is also on my NNTP server with message ID <1603312904.bystand@zzo38computer.org>.)

Re: Check for dark places

Posted: Wed Oct 21, 2020 9:42 pm
by asie
Nice find, zzo! To think it's been almost thirty years, and people are still finding new tricks...