10 [Serialize(
TeleportPosition.MainSub, IsPropertySaveable.Yes, description:
"Should the entity be teleported to the main submarine or the outpost?")]
13 [Serialize(
SpawnType.Human, IsPropertySaveable.Yes, description:
"The type of the spawnpoint to teleport the character to.")]
16 [Serialize(
"", IsPropertySaveable.Yes, description:
"Optional tag of the spawnpoint.")]
19 [Serialize(
"", IsPropertySaveable.Yes, description:
"Tag of the target(s) to teleport.")]
22 private bool isFinished;
24 public TeleportAction(ScriptedEvent parentEvent, ContentXElement element) : base(parentEvent, element) { }
26 public override void Update(
float deltaTime)
28 if (isFinished) {
return; }
37 foreach (var target
in ParentEvent.GetTargets(
TargetTag))
39 if (target is Character c)
41 c.TeleportTo(wp.WorldPosition);
48 public override bool IsFinished(ref
string goToLabel) => isFinished;
50 public override void Reset() => isFinished =
false;
Teleports a specific entity to a specific spawn point.
override bool IsFinished(ref string goToLabel)
override void Update(float deltaTime)
TeleportPosition Position
TeleportAction(ScriptedEvent parentEvent, ContentXElement element)