Voice Activated Self Destruct

TBD_314
24 Jan 2024, 01:40

Hi, I am trying to create a script that will allow a player to type "say self destruct", and have the game recognize it if the player is standing in the correct room! How would I go about creating this? Thanks!


mrangel
24 Jan 2024, 09:14

I would suggest creating a command with the pattern say self destruct and put it in that room. Same as creating any other command.

I would then create a general command with the pattern say #text#, which maybe gives some kind of response about how talking to yourself makes you feel better. That way, if the player tries to say it in the wrong place, or says the wrong words, they won't get the impression that the game doesn't understand "say".

Alternatively, instead of putting the "say self destruct" command in the room, you could start the command's script with an if statement with the condition Contains (name of room, game.pov) - which checks if the player is in that room. You could have the else clause display a message like "You aren't in the right place" to make it clearer to the player what they got wrong.