sm.tool
Associated object type: Tool
A tool is a scripted tool a player holds in their hand.
The tool object is focused on handling animations for first and third person view.
For more information about creating your own scripted tools, see ToolClass.
Functions
checkLiftCollision
sm.tool.checkLiftCollision( creation, position, rotation )
Used to check collisions between the lift and the world.
Arguments:creation
[ table ]: A table of all the bodies belonging to the creation placed on the lift.position
[ Vec3 ]: The lift position.rotation
[ int ]: The rotation of the creation on the lift.
- [ bool ]: Whether the lift collides with the world or not.
- [ int ]: The lift level.
forceTool
sm.tool.forceTool( tool )
Client-Only
Force equip a tool for the local player.
Pass nil to unforce an already forced tool.
tool
[ Tool ]: The tool.
preloadRenderables
sm.tool.preloadRenderables( renderables )
Client-Only
Pre-loads renderable data to be used by the tool.
This eliminates excessive loading during run time.
renderables
[ table ]: The table of renderable file paths.
uuidExists
sm.tool.uuidExists( uuid )
Returns whether the tool uuid exists.
Arguments:uuid
[ Uuid ]: The uuid.
- [ bool ]: Whether the uuid exists or not.