Teleporters

Timeline

The timeline is only required for teleporter cooldowns.

entity {

	layers {

		"game/pvp/demon_team" // Applies only to Demon Players

	}

	entityDef invasion_portal_timeline_1 {

	inherit = "target/timeline";

	class = "idTarget_Timeline";

	expandInheritance = false;

	poolCount = 0;

	poolGranularity = 2;

	networkReplicated = false; // Must be false so cooldown is not shared globally

	disableAIPooling = false;

	edit = {

		flags = {

			noFlood = true;

		}

		networkSerializeTransforms = false;

		spawnPosition = {

			x = 1;

			y = 1;

			z = 1;

		}

		componentTimeLine = {

			entityEvents = {

				num = 2;

				item[0] = {

					entity = "invasion_portal_fx_demon_1";

					events = {

						num = 2;

						item[0] = {

							eventCall = {

								eventDef = "hide"; // Hide 1st effect upon activation

								args = {

									num = 0;

								}

							}

						}

						item[1] = {

							eventTime = 5000;

							eventCall = {

								eventDef = "show"; // Show 1st effect after 5 seconds

								args = {

									num = 0;

								}

							}

						}

					}

				}

				item[1] = {

					entity = "invasion_portal_fx_demon_2";

					events = {

						num = 2;

						item[0] = {

							eventCall = {

								eventDef = "hide"; // Hide 2nd effect upon activation

								args = {

									num = 0;

								}

							}

						}

						item[1] = {

							eventTime = 5000;

							eventCall = {

								eventDef = "show"; // Show 2nd effect after 5 seconds

								args = {

									num = 0;

								}

							}

						}

					}

				}

			}

		}

		allowClientsToStart = true; // Must be true

		shouldForceTimelineFinish = true; // Must be true

	}

}

}

Dynamic Entity (Backer)

entity {

	entityDef invasion_portal_back_1 {

	inherit = "func/dynamic";

	class = "idDynamicEntity";

	expandInheritance = false;

	poolCount = 0;

	poolGranularity = 2;

	networkReplicated = false;

	disableAIPooling = false;

	edit = {

		spawnPosition = { // Set the spawn position roughly -0.2 (on the x or y axis) behind the portal FX

			x = -11.11;

			y = -11.11;

			z = -11.11;

		}

		spawnOrientation = { // Backer should be standing upright

			mat = {

				mat[0] = {

					x = 0;

					y = 0;

					z = -1;

				}

				mat[1] = {

					x = -1;

					y = 0;

					z = 0;

				}

				mat[2] = {

					x = 0;

					y = 1;

					z = 0;

				}

			}

		}

		renderModelInfo = {

			model = "art/kit/hell/bridge/bridge_archPillar_a_divider.lwo";

			scale = { // Do not change the scale, it will break collision

				x = 0.66;

				y = 0.66;

				z = 0.5;

			}

		}

		clipModelInfo = {

			clipModelName = "art/kit/hell/bridge/bridge_archPillar_a_divider.lwo"; // Adds collision

		}

	}

}

}

Portal FX (Slayer Team)

entity {

	layers {

		"game/pvp/slayer_team" // Only the Slayer can see this FX

	}

	entityDef invasion_portal_fx_slayer_1 {

	inherit = "func/fx";

	class = "idEntityFx";

	expandInheritance = false;

	poolCount = 0;

	poolGranularity = 2;

	networkReplicated = false;

	disableAIPooling = false;

	edit = {

		flags = {

			canBecomeDormant = true;

		}

		dormancy = {

			delay = 5;

			distance = 78.029007;

		}

		spawnPosition = { // Position should be identical to the FX on the demon team

			x = -11.11;

			y = -11.11;

			z = -11.11;

		}

		spawnOrientation = { // Orientation should be identical to the FX on the demon team

			mat = {

				mat[0] = {

					x = 0;

					y = 1;

					z = 0;

				}

				mat[1] = {

					x = -1;

					y = 0;

					z = 0;

				}

				mat[2] = {

					x = 0;

					y = 0;

					z = 1;

				}

			}

		}

		renderModelInfo = {

			scale = {

				x = 1;

				y = 1;

				z = 1;

			}

		}

		flags = {

			hide = false;

		}

		fxEffect = "gameplay/invasion/teleporter_flat_demon"; // FX is red

	}

}

}

Portal FX (Demon Team)

entity {

	layers {

		"game/pvp/demon_team" // Only Demon Players can see this FX

	}

	entityDef invasion_portal_fx_demon_1 {

	inherit = "func/fx";

	class = "idEntityFx";

	expandInheritance = false;

	poolCount = 0;

	poolGranularity = 2;

	networkReplicated = false;

	disableAIPooling = false;

	edit = {

		flags = {

			canBecomeDormant = true;

		}

		dormancy = {

			delay = 5;

			distance = 78.029007;

		}

		spawnPosition = { // Position should be identical to the FX on the slayer team

			x = -11.11;

			y = -11.11;

			z = -11.11;

		}

		spawnOrientation = { // Orientation should be identical to the FX on the slayer team

			mat = {

				mat[0] = {

					x = 0;

					y = 1;

					z = 0;

				}

				mat[1] = {

					x = -1;

					y = 0;

					z = 0;

				}

				mat[2] = {

					x = 0;

					y = 0;

					z = 1;

				}

			}

		}

		renderModelInfo = {

			scale = {

				x = 1;

				y = 1;

				z = 1;

			}

		}

		flags = {

			hide = false;

		}

		fxEffect = "gameplay/invasion/teleporter_flat_slayer"; // FX is blue

	}

}

}

Teleporter

entity {

	layers {

		"game/pvp/demon_team" // Only demon players can use the teleporter

	}

	entityDef invasion_portal_from_1 {

	inherit = "trigger/teleporter";

	class = "idTrigger_Teleporter";

	expandInheritance = false;

	poolCount = 0;

	poolGranularity = 2;

	networkReplicated = false; // Must be false so cooldown is not shared globally

	disableAIPooling = false;

	edit = {

		clientCanActivate = true; // Must be true

		fxExtraCondition = "FX_EXTRA_COND_MAX";

		sounds = {

			activated = "play_arena_teleporter_use";

		}

		spawnPosition = { // Position should be close to the idDynamicEntity backer

			x = -11.11;

			y = -11.11;

			z = -11.11;

		}

		renderModelInfo = {

			model = NULL;

		}

		clipModelInfo = {

			type = "CLIPMODEL_CYLINDER";

			size = { // Scale based on portal size

				x = 1;

				y = 3;

				z = 2;

			}

			clipModelName = NULL;

		}

		targets = {

			num = 1;

			item[0] = "invasion_portal_timeline_1"; // Activate the timeline to show and hide FX

		}

		dormancy = {

			playerDistance = 6;

			playerRearwardDistance = 6;

		}

		flags = {

			hide = false;

		}

		wait = 5; // Deactivate both teleporters for 5 seconds

		playerCanActivate = false; // Slayer cannot activate

		demonPlayerCanActivate = true; // Demon players can activate

		otherTeleporter = "invasion_portal_from_2"; // Deactivate this teleporter

		destination = "invasion_portal_dest_1"; // Go to this destination when activated

	}

}

}

Destination

entity {

	entityDef invasion_portal_dest_1 {

	inherit = "info/teleport_destination";

	class = "idInfo_TeleportDestination";

	expandInheritance = false;

	poolCount = 0;

	poolGranularity = 2;

	networkReplicated = false;

	disableAIPooling = false;

	edit = {

		spawnPosition = { // Position should be just foward of the opposing idTrigger_Teleporter

			x = -11.11;

			y = -11.11;

			z = -11.11;

		}

		spawnOrientation = { // Orientation should be identical to the opposing idEntityFx

			mat = {

				mat[0] = {

					x = 0;

					y = 1;

					z = 0;

				}

				mat[1] = {

					x = -1;

					y = 0;

					z = 0;

				}

				mat[2] = {

					x = 0;

					y = 0;

					z = 1;

				}

			}

		}

	}

}

}