mnscript
Device_InputButtonPressed(InputButtonDevice, Player, string)
Description ​
Invoked when a connected Input Button device is pressed
Arguments ​
InputButtonDevice
- The InputButtonDevice which was pressedPlayer
- The Player who pressed the buttonstring
- The input from the player
Example ​
msc
using Console;
using Event;
using Player;
using Device;
function OnInputButtonPressed(InputButtonDevice button, Player player, string text){
Console.WriteLine(button.GetName().." was pressed!");
Console.WriteLine(player.GetName().." sent: "..text);
}
Event.AddListener("Device_InputButtonPressed", "input button", "OnInputButtonPressed");