# \[Phaser-Arcade-Slopes plugin\] "tilemapLayer.getTileOffsetX is not a function"

**URL:** <https://phaser.discourse.group/t/phaser-arcade-slopes-plugin-tilemaplayer-gettileoffsetx-is-not-a-function/5933>\
**Category:** Phaser 2 / CE\
**Created:** [April 17, 2020, 2:17am UTC](https://phaser.discourse.group/t/phaser-arcade-slopes-plugin-tilemaplayer-gettileoffsetx-is-not-a-function/5933 "2020-04-17T02:17:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SHG42](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/shg42/32/2231_2.png) [@SHG42](https://phaser.discourse.group/u/SHG42)\
**Post date:** [April 17, 2020, 2:17am UTC](https://phaser.discourse.group/t/phaser-arcade-slopes-plugin-tilemaplayer-gettileoffsetx-is-not-a-function/5933/1 "2020-04-17T02:17:23Z")

</div>

This is my first time using CE, I’ve been learning Phaser 3 for the past few months. I wanted to set up a simple CE project to try out the [Phaser-Arcade-Slopes plugin](https://github.com/hexus/phaser-arcade-slopes), so I can compare it to handling slopes with MatterJS in P3. I followed the instructions on that page to set up my project, and I’ve been trying to follow [this tutorial](https://www.joshmorony.com/using-the-arcade-slopes-plugin-in-phaser/) as well, although I don’t quite understand how he set up his convertTilemapLayer() statement.

I’m using the barebones Webpack boilerplate from the CE master branch repo’s Resources directory.

The problem shows up when I try to enable collision between the player sprite and the platform which has been converted to use the slopes plugin. If I remove the collider statement, the error goes away. The only other warning or error in the console is a source map error message, but that was there before I included the plugin. And based on my Googling on the source map error, as I understood it, the source map error shouldn’t be impacting the functioning of my game.

What could be causing this?

Here is a screenshot of the console error message.

 ![slopeserror](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/4/49d85336cf57f619c908935ba369d005210f579c.png)

I have the rest of my source code in [this Drive folder](https://drive.google.com/open?id=1tJihj4hwv-gALrEQpZC3uvBPYga5gCiQ), but here’s my index.js file so far:  
import PIXI from ‘expose-loader?PIXI!phaser-ce/build/custom/pixi.js’;

```
import p2 from 'expose-loader?p2!phaser-ce/build/custom/p2.js';

import Phaser from 'expose-loader?Phaser!phaser-ce/build/custom/phaser-split.js';

var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });

function preload() {

  this.game.load.tilemap('hexustiles', './assets/tilemaps/stage2-hexustiles.json', null, Phaser.Tilemap.TILED_JSON);

  this.game.load.spritesheet('tiles', './assets/images/tilesets/arcade-slopes-16.png', 16, 16);

  this.game.load.atlas('hero', './assets/spritesheets/hero.png', './assets/spritesheets/hero.json', Phaser.Loader.TEXTURE_ATLAS_JSON_HASH);

}

function create() {

  this.game.physics.startSystem(Phaser.Physics.ARCADE);

  this.game.plugins.add(Phaser.Plugin.ArcadeSlopes);

  this.map = this.game.add.tilemap('hexustiles');

  this.tiles = this.map.addTilesetImage('arcade-slopes-16', 'tiles');

  this.platform = this.map.createLayer('hexus-tiles');

  this.map.setCollisionBetween(1, 38, true, this.platform);

  this.game.slopes.convertTilemapLayer(this.platform, 'arcadeslopes');

  this.hero = this.game.add.sprite(50, 50, 'hero', 'adventurer-idle-00-1.3');

  this.game.physics.arcade.enable(this.hero);

  this.hero.body.gravity.y = 2000;

  

  this.game.camera.follow(this.hero);

  this.game.slopes.enable(this.hero);

  this.controls = game.input.keyboard.createCursorKeys();

  console.log(this.game.slopes, this.platform, this.tiles);

};

  

function update() {

  this.game.physics.arcade.collide(this.hero, this.platform);

}
```
