gosha gosha

Generation

generate functionTue, 14 Feb 2023

you can use an if statement to check if an enemy is nearby. If an enemy is detected, the door can be closed automatically.

Script function enemyNearby(detected) { if (detected === true) { return "Close the door!"; } else { return "There is nothing to worry about."; } }

Want to kickstart your project?Use the new AI Studio to create your code