TileEffectType Detailed Explanation

This page explains how to use Tile Effects (TileEffectType) when using the function Map.putTileEffect. For more information on Tile Effects, please refer to the link provided below.

🔥 Tile Effects

📗 Basic Tile Effects

TileEffectType.NONE

A tile effect that has no effect.

Example

//Erases tile effects on the specified coordinates
Map.putTileEffect(x, y, TileEffectType.NONE);

TileEffectType.IMPASSABLE

A tile effect that does not allow users to pass.

Example

//Sets an IMPASSABLE tile effect on the corresponding coordinates
Map.putTileEffect(x, y, TileEffectType.IMPASSABLE);

TileEffectType.SPAWN

A tile effect that spawns users to a coordinate when the user enters the map.

Example

//Sets the SPAWN tile effect on the corresponding coordinates
Map.putTileEffect(x, y, TileEffectType.SPAWN);

🌀 Portal Tile Effects

TileEffectType.PORTAL

A tile effect that moves users to a different specified location area or a different map within the space.

Parameter

NameTypeDescription

type

Number

When the type is 0, can set a portal tile that allows players to another map within the Space. When the type is 1, can set a portal tile that allows players to move to another specific location within the map.

targetMapID

String

The MapID value of the target map

label

String

The text value to display over the portal

triggerByTouch

Boolean

When true: activates when contact is made When false: activates when f is pressed

invisible

Boolean

When true: hide the default portal image When false: show the default portal image

locationName

String

Value of the target location’s name (If type is 1, this value is a required field.)

Example

// when type: 0
// Installs a portal tile that leads to another map in the Space
Map.putTileEffect(x, y, TileEffectType.PORTAL, {
	type: 0, // Required 
	locationName: "TEST",  // Optional
	targetMapID: "gyV1N2", // Required 
	label: "PORTAL-TYPE0", // Optional
  triggerByTouch: true // Optional, "false" is default
});

// If type: 1
// Installs a portal tile that leads to a target area in the same map
Map.putTileEffect(x, y, TileEffectType.PORTAL, {
	type: 1, // Required 
	label: "PORTAL-TYPE1",  // Optional
	locationName: "TEST", // Required 
	invisible: true, // Optional, hiding the default portal image
	triggerByTouch: true  // Optional, "false" is default
});

TileEffectType.SPACE_PORTAL

A tile effect that moves participants to another Space.

Parameter

NameTypeDescription

label

String

The text value to display over the portal

targetMapID

String

The SpaceID value of the target Space

https://zep.us/play/[Space ID]

locationName

String

Value of the target location’s name

triggerByTouch

Boolean

When true: activates when contact is made When false: activates when f is pressed

invisible

Boolean

When true: hide the default portal image When false: show the default portal image

Example

// Installs a portal tile that leads to another Space
Map.putTileEffect(x, y, TileEffectType.SPACE_PORTAL, {
	label: "SPACE_PORTAL",  // Optional
	targetMapID: "zydmYD", //Required 
	locationName: "SPACE1",  // Optional
	invisible: true,  // Optional, "false" is default
	triggerByTouch: true,  // Optional, "false" is default
});

🌐 Embed Tile Effects

TileEffectType.EMBED

A tile effect that opens a web link in a new window.

Parameter

NameTypeDescription

link

String

Value of the web URL

align2

String

Location where to show the window ’popup’, ‘sidebar’, ‘top’, ‘topleft’, ‘topright’, ‘middle’, ‘middleleft’, ‘middleright’, ‘bottom’, ‘bottomleft’, ‘bottomright’

label

String

The text value to display over the portal

triggerByTouch

Boolean

When true: activates when contact is made When false: activates when f is pressed

invisible

Boolean

When true: hide the default portal image When false: show the default portal image

Example

// Installs a portal effect that opens a web link in a new window
Map.putTileEffect(x, y, TileEffectType.EMBED, {
	link: "https://zep.us/", // Required
	align2: "top", // Required
	label: "ZEP-SCRIPT-EMBED",  // Optional
});

TileEffectType.WEB_PORTAL

A tile effect that opens a web link in a new tab.

Parameter

NameTypeDescription

link

String

Value of the web URL

label

String

The text value to display over the portal

invisible

Boolean

When true: hide the default portal image When false: show the default portal image

Example

// Installs a tile effect that opens a web link in a new tab.
Map.putTileEffect(x, y, TileEffectType.WEB_PORTAL, {
	link: "https://zep.us/", // Required
	label: "ZEP-SCRIPT-WEB-PORTAL", // Optional
	invisible: true, // Optional, "false" is default
});

TileEffectType.TILE_EMBED

A tile effect that embeds a web URL in a designated area.

Parameter

NameTypeDescription

link

String

Value of the web URL

width

number

Width of the designated area (number of tiles)

height

number

Height of the designated area (number of tiles)

Example

// Installs a web in a designated area
Map.putTileEffect(x, y, TileEffectType.TILE_EMBED, {
	link: "https://zep.us/", // Required 
	width: 5, // Required 
	height: 5, // Required 
});

💠 Utility Tile Effects

TileEffectType.PRIVATE_AREA

A tile effect that has a private area effect.

Parameter

NameTypeDescription

id

Number

ID Value of the private area

impassable

Boolean

When true: sets the private area "impassable"

param1

String

When param1 is "true", only one person is allowed per tile

Example

// Installs a private area in the designated coordinates
Map.putTileEffect(18, 15, TileEffectType.PRIVATE_AREA, {
		id: 3, // Required
		impassable: false,  // Optional, "false" is default
		param1: "true",   // Optional, "false" is default
	});

TileEffectType.LOCATION

A tile effect for a map location.

Parameter

NameTypeDescription

label

String

The text value to display over the tile

name

String

Name of the map location

width

number

Width of the designated area (number of tiles)

height

number

Height of the designated area (number of tiles)

Example

// Installs a map location in the designated coordinates
Map.putTileEffect(x, y, TileEffectType.LOCATION, {
	label: "LOCATION",  // Optional
	name: "zep-script-location", // Required 
	width: 3, // Required 
	height: 2, // Required 
});

TileEffectType.AMBIENT_SOUND

A tile effect for ambient sound.

Parameter

NameTypeDescription

link

String

Name of the sound file to play (included in the ZIP file)

activeDistance

Number

Radius of ambient sound (number of tiles)

triggerByTouch

Boolean

When true: activates when contact is made When false: activates when f is pressed

Example

Map.putTileEffect(x, y, TileEffectType.AMBIENT_SOUND, {
	link: "ring.mp3", // Required 
	activeDistance: 1, // Required
	triggerByTouch: false, // Optional
});

Last updated