mnscript
Device_ButtonPressed(ButtonDevice, Player)
Description ​
Invoked when a connected button device is pressed
Arguments ​
ButtonDevice
- The ButtonDevice which was pressedPlayer
- The Player who pressed the button
Example ​
msc
using Console;
using Event;
using Player;
using Device;
function OnButtonPressed(ButtonDevice device, Player player){
Console.WriteLine(player.GetName().." pressed a button!");
}
Event.AddListener("Device_ButtonPressed", "buttons", "OnButtonPressed");