diff options
Diffstat (limited to 'res/scripts')
| -rw-r--r-- | res/scripts/common.lua | 16 |
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 | |||
| 284 | function RemoveExpression(spriteName) | 284 | function RemoveExpression(spriteName) |
| 285 | DestroyNamedSprite(AliasForSpriteExpression(spriteName)) | 285 | DestroyNamedSprite(AliasForSpriteExpression(spriteName)) |
| 286 | end | 286 | end |
| 287 | |||
| 288 | --- Turns on clipping for the player. | ||
| 289 | -- This allows walking through solid objects. For debug only! | ||
| 290 | function StartClipping() | ||
| 291 | local playerId = getPlayerSprite() | ||
| 292 | local playerSprite = getSprite(playerId) | ||
| 293 | playerSprite.clipping = true | ||
| 294 | end | ||
| 295 | |||
| 296 | --- Turns off clipping for the player. | ||
| 297 | -- For debug only! | ||
| 298 | function StopClipping() | ||
| 299 | local playerId = getPlayerSprite() | ||
| 300 | local playerSprite = getSprite(playerId) | ||
| 301 | playerSprite.clipping = false | ||
| 302 | end | ||
