Spaces:
Running
Running
File size: 753 Bytes
87b3b3a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# 03_theCollapsingRoom.md
## urandon: Weather cleaner
If we want to stop the rain, we can destroy rainmaker.
```javascript
map.defineObject('rocket', {
'type': 'dynamic',
'projectile': true,
'behavior': function (me) { me.move('up'); }
});
map.placeObject(1, 2, 'rocket');
```
## Redefine Math.random
```javascript
Math.random = function() { return 0.75; }
```
## Edit "objects.js".
```javascript
// obstacles
'block': {
'symbol': '#',
'color': '#999',
'impassable': false
},
```
## pppery: Variable overwrite
Make blocks fall outside the room too for more time
```javascript
grid_x = grid_y = 0;
half_width = map.getWidth();
half_height = map.getHeight();
```
|