summary refs log tree commit diff stats
path: root/res/scripts/common.lua
diff options
context:
space:
mode:
Diffstat (limited to 'res/scripts/common.lua')
-rw-r--r--res/scripts/common.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 45b596d..af25333 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua
@@ -284,3 +284,19 @@ end
284function RemoveExpression(spriteName) 284function RemoveExpression(spriteName)
285 DestroyNamedSprite(AliasForSpriteExpression(spriteName)) 285 DestroyNamedSprite(AliasForSpriteExpression(spriteName))
286end 286end
287
288--- Turns on clipping for the player.
289-- This allows walking through solid objects. For debug only!
290function StartClipping()
291 local playerId = getPlayerSprite()
292 local playerSprite = getSprite(playerId)
293 playerSprite.clipping = true
294end
295
296--- Turns off clipping for the player.
297-- For debug only!
298function StopClipping()
299 local playerId = getPlayerSprite()
300 local playerSprite = getSprite(playerId)
301 playerSprite.clipping = false
302end