Device_MotionDetectorTriggered
Skip to content
mnscript
Device_MotionDetectorTriggered(MotionDetectorDevice, Player) 

Description ​

Invoked when a connected Motion Detector is triggered

Arguments ​

MotionDetectorDevice - The MotionDetectorDevice which was triggered
Player - The Player who triggered the detector

Example ​

msc
using Console;
using Event;
using Player;
using Device;

function OnMotionDetectorTriggered(MotionDetectorDevice detector, Player player){
    Console.WriteLine(player.GetName().." triggered a motion detector!");
}

Event.AddListener("Device_MotionDetectorTriggered", "motion detectors", "OnMotionDetectorTriggered");