Segs / Segs

:muscle: SEGS - Super Entity Game Server

Home Page:https://segs.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create Teleport SlashCommand

broxen opened this issue · comments

Summary

It will be useful to have a /teleport command to move quickly around a map. It should replicate the functionality of the Teleport power.

Bonus points if also entering a player name as an argument teleports that player (as teleport foe would do) e.g. /teleport broxen

It would have be teleport to target name, since we can't force the client to create a location target. I think that's what we decided a while ago.

Could we simply make it spoof /usePower

We have a script command (/script MapInstance.JumpPersist(x)) that teleports the player to the indexed NPC. It's pretty simple and could be adapted into a slash command, I presume. Of course, the user won't know who or where it's jumping them until they've used it and start to remember which NPC corresponds to a number in a map. There's probably a better solution but this may be an easy one.

An interesting side effect of the way I've implemented this for #889 is that using /tp with no target (or targeting self) results in a resync of the client/server position. So useful all around.