Revision Difference
Sandbox_Specific_Mapping#512805
<cat>Dev.Map</cat>⤶
This page describes a few hidden tricks map makers can use to affect interactions of Sandbox features with the map.⤶
⤶
# Preventing tools from being used on certain entities ⤶
⤶
You can use the **gmod_allowtools** property on any entity in your map to allow only certain tools to affect the entity.⤶
⤶
The format for the value is a list of **tool class names** separated by a single space character. The **tool class name** is the file name of the tool inside the **garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/tools/** excluding the .lua file extension. It will also work with addons.⤶
⤶
For example setting it to the following value:⤶
⤶
```⤶
colour button balloon light lamp dynamite thruster paint⤶
```⤶
⤶
⤶
Will only allow **Color, Button, Balloon, Light, Lamp, Dynamite, Thruster** and **Paint** Tools to be used on that entity.⤶
This is what the "Color Room" in sandbox does.⤶
⤶
Leaving the field empty will disallow all tools from being used on the entity.⤶
⤶
This field also affects the "Hold C for Context Menu and right click on the entity" feature.⤶
⤶
# Preventing Physics Gun from being used on certain entities ⤶
⤶
Similarly you can use **gmod_allowphysgun** on any entity to prevent the Physics Gun from being able to pick that entity up.⤶
⤶
The only possible value here is 0 to disallow Physics Gun from interacting with the entity. Any other value will count as allowed.⤶
⤶
# Adding these properties ⤶
⤶
To add or edit any of these properties, you must disable the **Smart Edit** option in your **Object Properties** and manually add or edit the desired property.⤶
⤶
Here's an example - gm_construct's Color Room settings:⤶
⤶
⤶