← MPP-Mainstore › Scripts MPP - Action Button Download the documentation (.md)

Version 1.7.1 · updated September 23, 2026

MPP - Action Button V1.7.1 - Documentation

Overview

Click or collision button that sends chat text or posts a Script Event command. Unified command model: the button has 1 to 4 commands. One command = single action (flash), multiple commands = cycling sequence. Includes optional interaction sound, visual tint and emissive feedback, remote control via Script Events, a private cooldown notice and access control.

This script is standalone - it does not require any other MPP script to function. When combined with other MPP scripts (Light Switch, Commands Help On Chat, TransformByClickOrChat, etc.), it acts as a universal trigger.

In the Build panel the settings are grouped by category: Activation/, Access/, Command/, Remote/, Sound/, Visual/ and Debug/.

New in V1.7.1: the settings are grouped by category in the Build panel, and the access control uses the same scheme as the other MPP scripts: Access/Permission Mode (1-3) with a Whitelist and a Blacklist. The three access settings of V1.7.0 are not carried over: read "Updating from V1.7.0" before you update buttons already placed in a scene.


Changelog

V1.7.1 (from V1.7.0) - Settings by category and unified access

ChangeDescription
Permission Mode (1-3)Replaces Owner Only, Access List and List Is Blacklist: 1 = Owner only, 2 = Owner + Whitelist, 3 = Everyone except the Blacklist (default; empty list = everyone). Same scheme as MPP - Light Switch and the other MPP scripts.
Whitelist and BlacklistTwo separate lists of avatar handles or UUIDs, instead of one list whose meaning depended on a switch.
Settings by categoryActivation/, Access/, Command/, Remote/, Sound/, Visual/, Debug/.
Renamed labelsCollision Mode is now Activation/Use Collision, Visual is Visual/Visual Feedback, Emissive is Visual/Affect Emissive, Debug is Debug/Debug Logging. Same settings, same values.
Module nameThe script is listed as "MPP - Action Button" in the Build panel, without a version number in its name.

36 properties, as in V1.7.0. Every setting keeps its value when the script is swapped, except the three access settings, replaced by new ones (see "Updating from V1.7.0").

V1.7.0 (from V1.6) - Cooldown Notice and Access Control

ChangeDescription
Cooldown NoticeAn avatar who uses the button during its cooldown receives a private chat message: "Please wait 3 seconds before using this button again." Text is configurable ({time}, {seconds}). At most one message every 3 seconds per avatar.
Access controlOwner only, whitelist or blacklist of avatar handles or UUIDs; the owner is never blocked. (In V1.7.1 the three settings Owner Only, Access List and List Is Blacklist became Permission Mode, Whitelist and Blacklist.)
Denied TextPrivate message for avatars who are not allowed. At most one every 5 seconds per avatar. Empty = silent.
Hide From DeniedClick mode only: denied avatars do not see the button as clickable.
Anti double-click safetyA silent 0.1 s safety per avatar always remains, even with Cooldown Seconds = 0 (double-click protection).
More robustLighter on busy scenes; an avatar who leaves during a click no longer causes a script error.
Config warningsInitial Command above Command Count, a list the current mode does not use, list entries with spaces, unknown owner identity.
Sound Volume 0Now means no sound (V1.6 still played it at -48 dB).
DebugLogs the handle and UUID of every avatar who activates or is denied, to fill the lists easily.

29 -> 36 properties. All V1.6 property names are unchanged, so existing values carry over when the script is swapped.


How It Works

The button has 1 to 4 commands. Each click sends the next command and advances.

Command Count = 1 (Single Action)

Command Count = 2-4 (Cycling Sequence)

Activation order

  1. The avatar is validated (still in the scene).
  2. Access check - denied avatars receive Denied Text (throttled) and nothing else happens.
  3. Cooldown check - blocked avatars receive the cooldown notice (throttled) and nothing else happens.
  4. Sound, visual feedback, then the command (chat text or Script Event).

Activation Modes

Click Mode (default)

Collision Mode


Cooldown

ModeBehavior
Activation/Global Cooldown = Off (default)Each avatar has its own cooldown timer.
Activation/Global Cooldown = OnThe button has a single cooldown timer for all avatars.

Cooldown Notice

When an avatar tries to use the button during the cooldown, they receive a private chat message (only them, in their Nearby Chat).

PlaceholderReplaced byExample
{time}Remaining time with its unit1 second, 12 seconds, 2 minutes 30 seconds, 1 hour 5 minutes
{seconds}Remaining whole seconds150

Access Control

Who can use the button is set by one number and two lists, in the Access/ group. This is the scheme shared by every MPP script:

Access/Permission ModeWho can use the button
1 - Owner onlyThe scene owner only
2 - Owner + WhitelistThe scene owner and the avatars of Access/Whitelist (empty list = owner only)
3 - Everyone except Blacklist (default)Everyone, minus the avatars of Access/Blacklist (empty list = everyone)

List format (Whitelist and Blacklist)

Denied Text

Hide From Denied


Commands

Send as Command

The event payload contains the activating avatar's UUID (IActionButtonEventData).

Private Text

Only used when Command/Send as Command = Off. If On, text is sent only to the activating avatar.

Command Values


Initial Command

Controls the button's starting state when the scene loads.

ValueCount=1Count=2-4
0 (default)Button at rest. First click sends Command 1.Displays Command 1 tint. First click sends Command 1.
1Flashes Command 1 tint at startup.Displays Command 1 tint. First click sends Command 2.
2Ignored (warning)Displays Command 2 tint. First click sends next command.
3-4Ignored (warning)Same logic for commands 3-4. Above Command Count: ignored (warning).

Use case: Your button controls AvatarSpeed which starts in "normal" mode (= Command 2). Set Initial Command = 2 so the button shows Command 2 tint at startup and the first click sends Command 1 (speed boost).


Remote Control

When Remote/Remote Control = On, the button listens for incoming Script Events from other scripts to control its state externally.

Events Listened To

Event NameEffect
<prefix>_resetResets to command 1 (Count=1: flash+fade, Count>1: apply tint)
<prefix>_set_1Jump to command 1
<prefix>_set_2Jump to command 2 (if Count >= 2)
<prefix>_set_3Jump to command 3 (if Count >= 3)
<prefix>_set_4Jump to command 4 (if Count = 4)

Remote Token - Targeting specific buttons

Without a token, all Action Buttons sharing the same prefix react. The token differentiates instances.

ButtonControlsTokenListens to
Lobby LightsLobby lampslobbympp_actionbutton_lobby_reset, _set_1, _set_2
Stage LightsStage lampsstagempp_actionbutton_stage_reset, _set_1, _set_2
Avatar SpeedSpeed boostspeedmpp_actionbutton_speed_reset, _set_1, _set_2

Practical Examples

Master Reset button: Resets all buttons to command 1.

Reset one button only:

External script sync: A timer script calls PostScriptEvent("mpp_actionbutton_speed_set_2", ...) to force the Speed button to display command 2 when a boost expires automatically.

Remote flash for Count=1: A script calls PostScriptEvent("mpp_actionbutton_lobby_set_1", ...) -> the button flashes Command 1 Tint and returns to normal, as if someone clicked it.


Sound


Visual Feedback

Tint

CountBehavior
1Flash Command 1 Tint, hold 0.08s, fade back to initial tint over Return Fade Seconds (max 60 s).
2-4Apply Command N Tint instantly, stays until next click.

Emissive


Editor Properties Reference (36 total)

Activation (6)

PropertyTypeDefaultDescription
Activation/Use CollisionboolOffOff = click, On = collision or trigger volume
Activation/Hover Textstring"Use Button"Click mode hover text
Activation/Cooldown Secondsdouble0.75Cooldown duration (0 = disabled, 0.1 s safety remains)
Activation/Global CooldownboolOffButton-level vs per-avatar
Activation/Cooldown NoticeboolOnPrivate "please wait" message during cooldown
Activation/Cooldown Notice Textstring"Please wait {time} before using this button again."Notice text, {time} / {seconds}; empty = no message

Access (5)

PropertyTypeDefaultDescription
Access/Permission Mode (1-3)int (1-3)31 = Owner only, 2 = Owner + Whitelist, 3 = Everyone except Blacklist. The owner is always allowed
Access/Whiteliststring""Handles or UUIDs allowed in mode 2, comma or semicolon separated
Access/Blackliststring""Handles or UUIDs blocked in mode 3, comma or semicolon separated
Access/Denied Textstring"You are not allowed to use this button."Private message for denied avatars (empty = silent)
Access/Hide From DeniedboolOffClick mode: denied avatars cannot see the button as clickable

Command (8)

PropertyTypeDefaultDescription
Command/Send as CommandboolOffChat text vs Script Event
Command/Private TextboolOffSend to activator only (text mode)
Command/Command Countint (1-4)1Number of commands
Command/Initial Commandint (0-4)0Starting command at scene load
Command/Command 1string"command1"First command value
Command/Command 2string"command2"Second command value
Command/Command 3string"command3"Third command value
Command/Command 4string"command4"Fourth command value

Remote (3)

PropertyTypeDefaultDescription
Remote/Remote ControlboolOffListen for external control events
Remote/Remote Prefixstring"mpp_actionbutton"Prefix for incoming events
Remote/Remote Tokenstring""Token for targeting a specific button

Sound (2)

PropertyTypeDefaultDescription
Sound/Click SoundSoundResource(none)Optional activation sound
Sound/Sound Volumeint100Loudness 0-200 percent (0 = no sound)

Visual (11)

PropertyTypeDefaultDescription
Visual/Visual FeedbackboolOffEnable visual tint changes
Visual/Tint Material Namestring""Filter to a specific material
Visual/Return Fade Secondsdouble0.75Fade back duration (Count=1 only)
Visual/Command 1 TintColor(255,89,89,255)Tint for command 1
Visual/Command 2 TintColor(89,255,89,255)Tint for command 2
Visual/Command 3 TintColor(89,166,255,255)Tint for command 3
Visual/Command 4 TintColor(255,217,89,255)Tint for command 4
Visual/Affect EmissiveboolOffEnable emissive changes
Visual/Command 1-4 Emissivefloat1.0EmissiveIntensity per command

Debug (1)

PropertyTypeDefaultDescription
Debug/Debug LoggingboolOffWrites activations, access decisions (with the avatar handle and UUID), command state and materials to the script console

Updating from V1.7.0

Before you update, take a screenshot of the Build panel of each button whose access you had changed (Owner Only, Access List, List Is Blacklist): these three settings are replaced by new ones and their values are not carried over.

V1.7.0 settingsV1.7.1 settings
Owner Only Off, list empty (default)Permission Mode 3, lists empty: nothing to do
Owner Only Off, List Is Blacklist On, list filledPermission Mode 3, paste the list into Blacklist
Owner Only On, list emptyPermission Mode 1
Owner Only On, List Is Blacklist Off, list filledPermission Mode 2, paste the list into Whitelist

Updating from V1.6


Compatibility

IActionButtonEventData and PostScriptEvent are unchanged from V1.4.x. All consumer scripts (Light Switch, Commands Help On Chat, TransformByClickOrChat, StoreListingRouter, RandomObjectSpawner) remain fully compatible.

Event Payload Interface

public interface IActionButtonEventData
{
    string ActivatorAvatarUuid { get; }
}

ItemWhat it adds
Light Switch Script (V1.5.3)Lamps and glowing materials switched by this button with Send as Command On and mpp_lamp_all_toggle, mpp_lamp_<group>_on, etc. Store: https://www.sansar.com/store/listings/7379d48c-2b6f-45f6-b6f1-205ce95aec1c/light-switch-script
Commands Help On Chat Script (V1.5.2)A help button: Command 1 = show_commands_help shows the scene commands in Nearby Chat, in public or in private to the avatar who clicked. Store: https://www.sansar.com/store/listings/fea2df6b-21ce-48eb-94fc-4b7a7aad2777/commands-help-on-chat-script

MPP - My Pretty Pixels. Action Button V1.7.1 (script MPP - Action Button). Store: https://www.sansar.com/store/listings/3e1a3546-6c79-4527-bc1e-78d02648d19e/action-button-script

↑